コード例 #1
0
ファイル: DetectCharBehavior.cs プロジェクト: tarsupin/Nexus
        protected bool dirRight;                                        // If the charge is facing right (or false if left).

        public DetectCharBehavior(EnemyLand actor, byte viewDistance = 144, byte viewHeight = 32) : base(actor)
        {
            // Reaction
            this.viewDist   = viewDistance;
            this.viewHeight = viewHeight;
            this.dirRight   = false;

            // Timer
            this.timer     = Systems.timer;
            this.actionEnd = 0;

            this.SetBehavePassives();
        }
コード例 #2
0
ファイル: HopConstantBehavior.cs プロジェクト: tarsupin/Nexus
 public HopConstantBehavior(EnemyLand actor, byte hopStrength, byte xSpeed = 0) : base(actor)
 {
     this.actor       = actor;
     this.hopStrength = hopStrength;
     this.xSpeed      = xSpeed;
 }
コード例 #3
0
ファイル: HopBehavior.cs プロジェクト: tarsupin/Nexus
        private byte hopSpeed;                      // This identifies the Y-Velocity to hop with.

        public HopBehavior(EnemyLand actor, byte hopSpeed = 0, byte viewDistance = 144, byte viewHeight = 32) : base(actor, viewDistance, viewHeight)
        {
            this.hopSpeed = hopSpeed;
            this.SetBehavePassives(150, 30, 60, 11);
        }
コード例 #4
0
ファイル: ChargeBehavior.cs プロジェクト: tarsupin/Nexus
        private bool walk;                          // Whether the enemy walks or not.

        public ChargeBehavior(EnemyLand actor, byte chargeSpeed = 6, byte hopSpeed = 0, bool walk = false, byte viewDistance = 144, byte viewHeight = 32) : base(actor, viewDistance, viewHeight)
        {
            this.chargeSpeed = chargeSpeed;
            this.hopSpeed    = hopSpeed;
            this.walk        = walk;
        }