UI Manager erstellt
This commit is contained in:
parent
ecaeb4d11f
commit
4944d7463e
@ -303,6 +303,50 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 322531732}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &417262697
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 417262698}
|
||||
- component: {fileID: 417262699}
|
||||
m_Layer: 0
|
||||
m_Name: UI_Manager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &417262698
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 417262697}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &417262699
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 417262697}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1271dbd420eb5b14dae4b24f833bb965, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &747170971
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -710,7 +754,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 4.35
|
||||
value: 5.431
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3286218375903244322, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@ -1677,31 +1721,31 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: -0.8511778
|
||||
value: -0.30019215
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.52487755
|
||||
value: 0.40807855
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
value: 0.58593726
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
value: 0.6324825
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 296.68
|
||||
value: 279.53198
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
value: -263.167
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
value: 143.506
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
@ -1776,3 +1820,4 @@ SceneRoots:
|
||||
- {fileID: 1544909526857362950}
|
||||
- {fileID: 1062964501}
|
||||
- {fileID: 1030353343}
|
||||
- {fileID: 417262698}
|
||||
|
@ -24,7 +24,10 @@ public class BulletScript : MonoBehaviour
|
||||
private Ray ray;
|
||||
private RaycastHit hit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sobald life Time vorbei ist Destroy die Bullet.
|
||||
/// </summary>
|
||||
/// <param name="lifetime">Lifetime der Bullet</param>
|
||||
private void die(float lifetime){
|
||||
if(time > lifetime){
|
||||
GameObject.Destroy(this.gameObject);
|
||||
@ -35,10 +38,18 @@ public class BulletScript : MonoBehaviour
|
||||
direction = hit.point - transform.position;//Richtung in die, die Kugel fliegt
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// clashPartical spawned clashPartical am EinschlagPunkt der Kugel.
|
||||
/// </summary>
|
||||
/// <param name="collision">Die Collision mit der Bullet.</param>
|
||||
public void clashPartcal(Collision collision){
|
||||
ContactPoint contact = collision.GetContact(0);
|
||||
Instantiate(particalClash,transform.position,Quaternion.LookRotation(contact.normal));
|
||||
}
|
||||
/// <summary>
|
||||
/// Wenn die Bullet etwas behrührt zerstört sie sich selbst.
|
||||
/// </summary>
|
||||
/// <param name="collision">Die Collision mit der Bullet</param>
|
||||
private void OnCollisionEnter(Collision collision){
|
||||
Debug.Log(collision.gameObject.name + " UND HIER IST DER TAG: " + collision.gameObject.tag);
|
||||
if(collision.transform.tag == "Enemy"){
|
||||
|
26
Plunderblock/Assets/UI_Manager.cs
Normal file
26
Plunderblock/Assets/UI_Manager.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UI_Manager : MonoBehaviour
|
||||
{
|
||||
public Text anzahlKills;
|
||||
|
||||
public Transform canvas;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
canvas = this.gameObject.GetComponentInChildren<Transform>();
|
||||
anzahlKills = canvas.GetComponentInChildren<Text>();
|
||||
anzahlKills.text = "3";
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Plunderblock/Assets/UI_Manager.cs.meta
Normal file
11
Plunderblock/Assets/UI_Manager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1271dbd420eb5b14dae4b24f833bb965
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user