Esempio n. 1
0
        internal AbilityManager(OriPlayer oPlayer)
        {
            this.oPlayer = oPlayer;

            //soulLink = new SoulLink(this);
            wallJump       = new WallJump(this);
            stomp          = new Stomp(this);
            airJump        = new AirJump(this);
            bash           = new Bash(this);
            glide          = new Glide(this);
            climb          = new Climb(this);
            chargeJump     = new ChargeJump(this);
            wallChargeJump = new WallChargeJump(this);
            dash           = new Dash(this);
            chargeDash     = new ChargeDash(this);
            lookUp         = new LookUp(this);
            crouch         = new Crouch(this);
            burrow         = new Burrow(this);
            launch         = new Launch(this);
        }
Esempio n. 2
0
        private void CheckValidPlacement(Point?check, out bool obstructed, bool force = false)
        {
            obstructed = false;
            if (!force && Main.time % 20 != 0)
            {
                return;
            }

            Box.UpdateHitbox(check ?? Center);
            var points = Box.Points;

            for (int i = 0, len = points.Length; i < len; i++)
            {
                Tile t = Main.tile[points[i].X, points[i].Y];
                if (!Burrow.IsSolid(t))
                {
                    continue;
                }
                obstructed = true;
                return;
            }
        }