//init function while in a room public void Init(DungeonMechanic Room) { _myRoom = Room; _lever = transform.GetChild(1).gameObject; //Debug.Log(_lever.name); _startPos.z = _startingRotation; _lever.transform.localEulerAngles = _startPos; }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { base.Init(_spawner, _incomingMech); _myCollider = GetComponent <Collider>(); if (_canMove) { _myAnimations.Play("Movement"); } }
private void disableRooms() { for (int i = 0; i < baseRoomList.Count; i++) { DungeonMechanic basicRoom = baseRoomList[i].GetComponent <DungeonMechanic>(); if (basicRoom.nextCheckpoint <= currentCheckpoint) { baseRoomList[i].SetActive(false); } } }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { _myAgent = GetComponent <NavMeshAgent>(); _mySpawner = _spawner; _spawnPoint = transform.position; _myBody = transform.GetChild(2).gameObject; _myRenderer = _myBody.GetComponent <SkinnedMeshRenderer>(); _mySpookiness = _myRenderer.materials[1]; _mySpookiness.color = _myColor; _myRenderer.materials[1] = _mySpookiness; }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { base.Init(_spawner, _incomingMech); _mySpawner.AddEnemy(this); _myAnimations.Play("Nothing", 0); _justSpawned = true; _hit = true; _myAgent.enabled = false; _knockBack = _initalSpawnSpeed; _deathDirection = transform.forward; _deathDirection.y = 0; _dead = true; }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { base.Init(_spawner, _incomingMech); _startingColor = _spookColor; if (_alwaysInvincible) { _spookColor = _invincibleColor; _particle.SetActive(true); _invincible = true; } else { _particle.SetActive(false); _invStartTime = Time.time; } }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { base.Init(_spawner, _incomingMech); _myBoss = _mySpawner.GetBigBoy.GetComponent <ColorBossGlhost>(); _mySpookiness.color = _myColor; _mySpookiness = _myRenderer.materials[1]; _myCapCollider = GetComponent <CapsuleCollider>(); _mySpawner.AddEnemy(this); _myAnimations.Play("Nothing", 0); _goingToBoss = false; _chillin = false; _myAgent.enabled = false; _deathDirection = _spawnDir; _deathDirection.y = 0; _init = true; }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { _myAgent.enabled = false; _mySpawner = _spawner; _myMechanic = _incomingMech; _menuRef = Menuing.Instance; _myBody = transform.GetChild(2).gameObject; _myRenderer = _myBody.GetComponent <SkinnedMeshRenderer>(); _mySpookiness = _myRenderer.materials[1]; _spookColor = _mySpookiness.color; _spookColor.a = 0; _myRenderer.materials[1] = _mySpookiness; _myAnimations = GetComponent <Animator>(); _myAnimations.Play("Moving", 0); _startTime = Time.time; }
// Use this for initialization public virtual void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { _myAgent = GetComponent <NavMeshAgent>(); _mySpawner = _spawner; _myMechanic = _incomingMech; _target = PlayerController.Instance; _menuRef = Menuing.Instance; _myBody = transform.GetChild(2).gameObject; _myRenderer = _myBody.GetComponent <SkinnedMeshRenderer>(); _mySpookiness = _myRenderer.materials[1]; if (_myMechanic == Mechanic.COLOR) { _mySpookiness.color = _myColor; } _spookColor = _mySpookiness.color; _spookColor.a = 0; _mySpookiness.color = _spookColor; _myRenderer.materials[1] = _mySpookiness; _myAnimations = GetComponent <Animator>(); _myAnimations.Play("Movement", 0); }
public override void Init(DungeonMechanic _spawner, Mechanic _incomingMech) { base.Init(_spawner, _incomingMech); _myProjectiles = new List <CathedralProjectile>(); }