// Use this for initialization void Awake() { count = 0; if (gameObject.name == "Hero1") { characterID = 0; player = GetComponent<Player> (); } else if (gameObject.name == "Hero2"){ characterID = 1; player = GetComponent<Player> (); } else if (GetComponent<MiniCopterBlock> ()) { characterID = 2; miniCopterBlock = GetComponent<MiniCopterBlock> (); } else if (gameObject.GetComponent<TankBlock> ()) { characterID = 3; tankBlock = GetComponent<TankBlock> (); } else if (GetComponent<JumpBlock> ()) { characterID = 4; jumpBlock = GetComponent<JumpBlock> (); } else if (GetComponent<TelekineticBlock> ()) { characterID = 5; telekineticBlock = GetComponent<TelekineticBlock> (); } else if (GetComponent<SuperTelekineticBlock> ()) { characterID = 6; superTelekineticBlock = GetComponent<SuperTelekineticBlock> (); } else if (GetComponent<DestructablePlatform>()){ characterID = 7; destructablePlatform = GetComponent<DestructablePlatform>(); } else if (GetComponent<TurretBlock>()){ characterID = 8; turretBlock = GetComponent<TurretBlock> (); } else if (GetComponent<SuperTurretBlock>()){ characterID = 9; superTurretBlock = GetComponent<SuperTurretBlock> (); } else if (GetComponent<PistonButton>()){ characterID = 10; pistonButton = GetComponent<PistonButton> (); } else{ characterID = 100; } }
// Use this for initialization void Awake() { crumbling = false; destructable = GetComponent <DestructablePlatform> (); }
// Use this for initialization void Awake() { count = 0; if (gameObject.name == "Hero1") { characterID = 0; player = GetComponent <Player> (); } else if (gameObject.name == "Hero2") { characterID = 1; player = GetComponent <Player> (); } else if (GetComponent <MiniCopterBlock> ()) { characterID = 2; miniCopterBlock = GetComponent <MiniCopterBlock> (); } else if (gameObject.GetComponent <TankBlock> ()) { characterID = 3; tankBlock = GetComponent <TankBlock> (); } else if (GetComponent <JumpBlock> ()) { characterID = 4; jumpBlock = GetComponent <JumpBlock> (); } else if (GetComponent <TelekineticBlock> ()) { characterID = 5; telekineticBlock = GetComponent <TelekineticBlock> (); } else if (GetComponent <SuperTelekineticBlock> ()) { characterID = 6; superTelekineticBlock = GetComponent <SuperTelekineticBlock> (); } else if (GetComponent <DestructablePlatform>()) { characterID = 7; destructablePlatform = GetComponent <DestructablePlatform>(); } else if (GetComponent <TurretBlock>()) { characterID = 8; turretBlock = GetComponent <TurretBlock> (); } else if (GetComponent <SuperTurretBlock>()) { characterID = 9; superTurretBlock = GetComponent <SuperTurretBlock> (); } else if (GetComponent <PistonButton>()) { characterID = 10; pistonButton = GetComponent <PistonButton> (); } else { characterID = 100; } }
// Use this for initialization void Awake() { crumbling = false; destructable = GetComponent<DestructablePlatform> (); }