Exemplo n.º 1
0
        private void SpawnBullet(IMapController mapController)
        {
            _bullet          = new EnemyBullet(Direction, 1, this);
            _bullet.Position = Position.Clone();
            DirectionalMovement.Move(Direction, _bullet.Position);
            var wasSpawned = mapController.Spawn(_bullet);

            if (!wasSpawned)
            {
                _bullet = null;
            }
        }
Exemplo n.º 2
0
        private void Update()
        {
            if (m_Movement != null)
            {
                Vector3 movement3d = new Vector3(m_MovementDirection.x, 0f, m_MovementDirection.y);
                m_Movement.Move(movement3d, Time.deltaTime);
            }

            GameObject objectInSight = m_Detection.GetObjectInSight();

            if (objectInSight)
            {
                Debug.Log("Object " + name + " has " + objectInSight.name + " in sight!");
            }
        }
Exemplo n.º 3
0
 public override void Move()
 {
     DirectionalMovement.Move(Direction, Position);
 }
Exemplo n.º 4
0
 public override void Move()
 {
     ChangeDirection();
     DirectionalMovement.Move(Direction, Position);
 }