private void Start() { health = maxHealth; virusController = GetComponent <VirusController>(); if (virusController.isAI) { GetComponent <GeneralAI>().radar = radar.GetComponent <Radar>(); } }
public void Die(bool isDouble) { spriteShape.SetActive(false); internals.SetActive(false); animator.SetTrigger("Die"); PlaySound(deathClip); if (!isDouble) { VirusController controller = GetComponentInParent <VirusController>(); controller.Ghostify(true); } }
private void Start() { seeker = GetComponent <Seeker>(); controller = GetComponent <VirusController>(); activatedShields = new Int32[ShieldsManager.instance.transform.childCount]; aiPlayerManager = GetComponent <PlayerManager>(); team = aiPlayerManager.team; if (team == Team.White) { minAttackDistance *= 2f; } if (PhotonNetwork.IsMasterClient) { InvokeRepeating("UpdatePath", 0f, .5f); } }