Ejemplo n.º 1
0
 public EnemyAttackAI(ProximitySensor sensor, Attack attack, Settings settings, FaceDirection faceDirection, [Inject(Id = InjectId.Owner)] GameObject owner)
 {
     _sensor        = sensor;
     _attack        = attack;
     _settings      = settings;
     _owner         = owner;
     _faceDirection = faceDirection;
 }
Ejemplo n.º 2
0
 public GhoulAI(Settings settings, ProximitySensor sensor, CharacterMotor motor, FaceDirection faceDirection, Pushback pushback)
 {
     _sensor        = sensor;
     _motor         = motor;
     _faceDirection = faceDirection;
     _settings      = settings;
     _pushback      = pushback;
 }
Ejemplo n.º 3
0
 public SquireAI(FaceDirection faceDirection, Move move, Settings settings, CharacterMotor motor, Pushback pushback)
 {
     _faceDirection = faceDirection;
     _move          = move;
     _settings      = settings;
     _motor         = motor;
     _pushback      = pushback;
 }
Ejemplo n.º 4
0
 public GolemDeath(FaceDirection faceDirection, Life life, ProximitySensor sensor,
                   EnemyAttackAI attackAi, [Inject(Id = InjectId.Owner)] GameObject owner)
 {
     _life          = life;
     _sensor        = sensor;
     _attackAi      = attackAi;
     _faceDirection = faceDirection;
     _collider      = owner.GetComponent <Collider2D>();
 }
Ejemplo n.º 5
0
 public SquireDeath(FaceDirection faceDirection, Move move, SquireAI squireAi, Life life, SquireDeathSignal deathSignal,
                    [Inject(Id = InjectId.Owner)] GameObject owner)
 {
     _faceDirection = faceDirection;
     _move          = move;
     _squireAi      = squireAi;
     _life          = life;
     _deathSignal   = deathSignal;
     _collider      = owner.GetComponent <Collider2D>();
 }
Ejemplo n.º 6
0
 public GhoulDeath([Inject(Id = InjectId.Owner)] GameObject owner, Settings settings,
                   Life life, Attack attack, FaceDirection faceDirection, GhoulAI ghoulAi, ProximitySensor sensor)
 {
     _owner         = owner;
     _settings      = settings;
     _life          = life;
     _faceDirection = faceDirection;
     _attack        = attack;
     _ghoulAi       = ghoulAi;
     _sensor        = sensor;
     _collider      = owner.GetComponent <Collider2D>();
 }
Ejemplo n.º 7
0
 public LietoDeath(FaceDirection faceDirection, Attack attack, Jump jump,
                   Move move, Life life, LietoPushed pushed,
                   LietoDeathSignal deathSignal,
                   DetectCheckpoint detectCheckpoint, CharacterMotor motor,
                   CameraFollow follow, Switch mySwitch)
 {
     _faceDirection = faceDirection;
     _attack        = attack;
     _jump          = jump;
     _move          = move;
     _life          = life;
     _pushed        = pushed;
     _deathSignal   = deathSignal;
     _switch        = mySwitch;
 }
Ejemplo n.º 8
0
        public static bool Check(FaceDirection _faceDirection, Vector2 position, float distance, float offsetY, string tag)
        {
            var direction     = new Vector2(_faceDirection.Direction, 0);
            var finalPosition = new Vector2(position.x, position.y + offsetY);

            var hits = Physics2D.RaycastAll(finalPosition, direction, distance);

            Debug.DrawRay(finalPosition, direction * distance, Color.magenta);

            for (int i = 0; i < hits.Length; i++)
            {
                var hit = hits[i];

                if (hit.transform.tag == tag)
                {
                    _faceDirection.SetDirection(-(int)direction.x);
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 9
0
 public Attack(Settings settings, FaceDirection faceDirection, [Inject(Id = InjectId.Owner)] GameObject owner)
 {
     _settings      = settings;
     _owner         = owner;
     _faceDirection = faceDirection;
 }
Ejemplo n.º 10
0
 public void Construct(GG.FaceDirection faceDirection)
 {
     _faceDirection = faceDirection;
 }