public _Enter(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as EnterData; _TargetDirection = Vector2.zero; var enemyPosition = (Vector2)Camera.main.WorldToViewportPoint(enemy.transform.position); if (enemyPosition.x < 0) { _TargetDirection.x = 1; } if (enemyPosition.y > 1) { _TargetDirection.y = -1; } if (enemyPosition.y < 0) { _TargetDirection.y = 1; } if (enemyPosition.x > 1) { _TargetDirection.x = -1; } if (_TargetDirection.x != 0 && _TargetDirection.y != 0) { _TargetDirection = -enemy.transform.position.normalized; } }
public _MoveProcesserBase(Enemy enemy, EnemyMoveDataBase data) { _Enemy = enemy; _CompleteObserver = new Subject <Unit> (); if (data.SwingData == null) { _Swing = new _NullSwing(); } else { _Swing = new _Swing(data.SwingData); } }
public _RandomLinear(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as RandomLinearData; }
public _AssaultToPlayer(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as AssaultToPlayerData; }
public _ApproachToPlayer(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as ApproachPlayerData; }
public _Exit(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as ExitData; }
public _Linear(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as LinearMoveData; }
public _MoveToPoint(Enemy enemy, EnemyMoveDataBase data) : base(enemy, data) { _Data = data as MoveToPositionData; }