Пример #1
0
        private void DrawMonsterPathGizmmo(MonsterPath monsterPath)
        {
            if (monsterPath.MonsterCheckpoints == null)
            {
                return;
            }

            MonsterCheckpoint prev    = null;
            Vector3           prevPos = Vector3.zero;

            foreach (var checkpoint in monsterPath.MonsterCheckpoints)
            {
                Gizmos.color = Color.magenta;
                var ModelScale = MapRenderer.Instance.ModelScale;
                var position   = new Vector3(checkpoint.X * ModelScale,
                                             MapRenderer.Instance.GetHeight(checkpoint.X, checkpoint.Z) + 0.5f,
                                             checkpoint.Z * ModelScale);
                Gizmos.DrawCube(position, new Vector3(1, 1, 1));

                if (prev != null)
                {
                    Gizmos.DrawLine(prevPos, position);
                }

                prev    = checkpoint;
                prevPos = position;
            }
        }
Пример #2
0
 public void ReachDestination()
 {
     if (CurrentPath.EndInStronghold)
     {
         GameManager.Instance.StrongholdDamage(MonsterPrototype.DamageOnStronghold);
         CurrentPath = null;
         GameObject.Destroy(gameObject);
     }
     else
     {
         CurrentPath            = CurrentPath.GetAnyDestinationPath(GameManager.Instance.Game.CurrentLevel);
         CurrentCheckpointIndex = 0;
     }
 }
Пример #3
0
 public ShieldedInvader(MonsterPath path) : base(path)
 {
 }
Пример #4
0
 public FastInvader(MonsterPath path) : base(path)
 {
 }
Пример #5
0
 public BasicInvader(MonsterPath path) : base(path)
 {
 }
Пример #6
0
 public Invader(MonsterPath path)
 {
     _path = path;
 }
 public ResurrectingInvader(MonsterPath path)
 {
     _incarnation1 = new BasicInvader(path);
     _incarnation2 = new StrongInvader(path);
 }
Пример #8
0
 public StrongInvader(MonsterPath path) : base(path)
 {
 }