void Start() { station = FindObjectOfType <SpaceStation>(); Assert.IsNotNull(station); lootParent = FindObjectOfType <LootParent>(); Assert.IsNotNull(lootParent); Vector2 det = new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f)); rb = GetComponent <Rigidbody2D>(); Assert.IsNotNull(rb); }
void Start() { lootParent = FindObjectOfType <LootParent>(); if (lootParent == null) { Instantiate(lootParentPrefab); lootParent = FindObjectOfType <LootParent>(); } Assert.IsNotNull(lootPrefab); Assert.IsNotNull(lootParent); }
void Start() { player = FindObjectOfType <PlayerController>().transform; Assert.IsNotNull(player); Assert.IsNotNull(lootParentPrefab); lootParent = FindObjectOfType <LootParent>(); if (lootParent == null) { Instantiate(lootParentPrefab); lootParent = FindObjectOfType <LootParent>(); } Assert.IsNotNull(lootParent); }
void Start() { lootParent = FindObjectOfType <LootParent>(); if (lootParent == null) { Instantiate(lootParentPrefab); lootParent = FindObjectOfType <LootParent>(); } Assert.IsNotNull(lootParent); sHome = FindObjectOfType <SpaceStation>(); Assert.IsNotNull(sHome); pState = GetComponent <PlayerState>(); Assert.IsNotNull(pState); pAnim = GetComponent <PlayerAnimation>(); Assert.IsNotNull(pAnim); }