public void Init(float speedPlayer, BoundaryMove boundsMove, Vector3 spawnPositionPlayer)
 {
     currentPlayer = Instantiate(playerPrefabs, spawnPositionPlayer, Quaternion.Euler(-90, 0, 0), transform);
     currentPlayer.Init(speedPlayer, boundsMove, ContactEnemy, bullPrefab);
     StartCoroutine(CheckMove());
     StartCoroutine(CheckFire());
 }
Esempio n. 2
0
        public void Init(float speed, BoundaryMove boundaryMove, Action <GameObject> contactEnemyAction, Bull bullPrefab)
        {
            this.speed = speed;
            if (rigidbody == null)
            {
                rigidbody = GetComponent <Rigidbody>();
            }

            boundary       = boundaryMove;
            contactAction += contactEnemyAction;
            bullPrefabs    = bullPrefab;
        }