private void OnEnable() { npcMaster = GetComponent <NPC_Master>(); npcMaster.EventNpcDeath += TurnOffChild; npcMaster.EventNpcDeath += DestroyGO; }
void SetInitialReferences() { npcMaster = GetComponent <NPC_Master>(); if (GetComponent <NavMeshAgent>() != null) { myNavMeshAgent = GetComponent <NavMeshAgent>(); } }
void SetInitialReferences() { npcMaster = GetComponent <NPC_Master>(); if (GetComponent <Animator>() != null) { myAnimator = GetComponent <Animator>(); } }
void SetInitialReferences() { npcMaster = GetComponent <NPC_Master>(); if (GetComponent <NPC_StatePattern>() != null) { npcStatePattern = GetComponent <NPC_StatePattern>(); } }
void SetInitialReferences() { npcStatePattern = GetComponent <NPC_StatePattern>(); npcMaster = GetComponent <NPC_Master>(); GameObject gameManager = GameObject.Find("GameManager"); npcRelationsMaster = gameManager.GetComponent <GameManager_NPCRelationsMaster>(); }
public void ProcessDamage(int damage) { int damageToApply = damage * damageMultiplier; if (npcMaster == null) { npcMaster = transform.root.GetComponent <NPC_Master>(); } npcMaster.CallEventNpcDeductHealth(damageToApply); }
void SetInitialReferences() { npcMaster = transform.root.GetComponent <NPC_Master>(); if (GetComponent <Collider>() != null) { myCollider = GetComponent <Collider>(); } if (GetComponent <Rigidbody>() != null) { myRigidbody = GetComponent <Rigidbody>(); } }
void SetInitialReferences() { gunMaster = GetComponent <Gun_Master>(); myTransform = transform; if (transform.root.GetComponent <NPC_Master>() != null) { npcMaster = transform.root.GetComponent <NPC_Master>(); } if (transform.root.GetComponent <NPC_StatePattern>() != null) { npcStatePattern = transform.root.GetComponent <NPC_StatePattern>(); } }
private void Start() { npcStatePattern = gameObject.transform.root.GetComponent <NPC_StatePattern>(); npcMaster = gameObject.transform.root.GetComponent <NPC_Master>(); head = (head == null) ? npcStatePattern.head : head; }
private void Awake() { waitTime = Time.time + 3f; npcMaster = transform.root.GetComponent <NPC_Master>(); }
void SetInitialReferences() { npcMaster = GetComponent <NPC_Master>(); npcHealth = (npcHealth >= npcMaxHealth) ? npcMaxHealth : npcHealth; }
void SetInitialReferences() { npcMaster = transform.root.GetComponent <NPC_Master>(); }
void SetInitialReferences() { npcMaster = transform.root.GetComponent <NPC_Master>(); scoreManager = GameManager_References._player.GetComponent <ScoreManager> (); }