void Start() { instance = this; /*linkBox = link.GetComponent<BoxCollider2D>(); * shieldBox = Shield.GetComponent<BoxCollider2D>(); * swordBox = Sword.GetComponent<BoxCollider2D>(); */ rb2d = GetComponent <Rigidbody2D>(); myStats = GetComponent <CharacterStats>(); lift = FindObjectOfType <LiftScript>(); if (lift != null) { liftCollider = lift.GetComponent <Collider2D>(); } }
void Start() { liftscript = lift.GetComponent <LiftScript>(); userInput = player.GetComponent <UserInput>(); liftCome1 = basementDoor.GetComponent <LiftCome>(); liftCome2 = level1Door.GetComponent <LiftCome>(); liftCome3 = level2Door.GetComponent <LiftCome>(); liftCome4 = roofDoor.GetComponent <LiftCome>(); notHereRenderer = notHereLight.GetComponent <Renderer>(); hereRenderer = hereLight.GetComponent <Renderer>(); notHereRenderer.material.color = redStop; hereRenderer.material.color = greenDim; }
void Start() { anim = lift.GetComponent <Animator>(); liftScript = lift.GetComponent <LiftScript>(); batteryTower = batTower.GetComponent <BPGscript> (); }