public override CreatureAction PerfectCopy(Creature targetCreature) { var newRotator = new BasicRotator(targetCreature); newRotator._rotationDirection = _rotationDirection; return(newRotator); }
// Use this for initialization void Start() { if (m_spinFX == null) { Debug.Log("m_spinFX not assigned!"); } m_audioSource = GetComponent <AudioSource>(); if (m_audioSource == null) { Debug.Log("m_audioSource not found!"); } m_player = GameObject.FindGameObjectWithTag("Player"); if (m_player == null) { Debug.Log("m_player not found!"); } m_playerController = m_player.GetComponent <PlayerController>(); if (m_playerController == null) { Debug.Log("m_playerController not found!"); } m_playerRB = m_player.GetComponent <Rigidbody>(); if (m_playerRB == null) { Debug.Log("m_playerRB not found!"); } m_turretRotator = GetComponentInChildren <BasicRotator>(); if (m_turretRotator == null) { Debug.Log("m_turretRotator not found!"); } m_bulletPool = GetComponents <ObjectPool>()[0]; if (m_bulletPool == null) { Debug.Log("m_bulletPool not found!"); } m_playerBodyProjectorPool = GetComponents <ObjectPool>()[1]; if (m_bulletPool == null) { Debug.Log("m_playerBodyProjectorPool not found!"); } m_defaultProjectorPool = GetComponents <ObjectPool>()[2]; if (m_bulletPool == null) { Debug.Log("m_defaultProjectorPool not found!"); } }