Пример #1
0
        public Player(int health, float speedX, float jumpY, int damage, int team, int face, string name, int id)
            : base(0.5f)
        {
            string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            sprite              = run = stand = jump = swing = runSwing = jumpSwing = null;
            this.id             = id;
            movingSpeedX        = speedX;
            jumpSpeedY          = jumpY;
            this.face           = face;
            this.team           = team;
            teamAfterRespawn    = team;
            lastHitByPlayer     = -1;
            Frags               = 0;
            Assists             = 0;
            Deaths              = 0;
            inAir               = false;
            this.Health         = health;
            this.healthMax      = health;
            poison              = 0;
            Dead                = false;
            TimeToRespawn       = 0;
            damageStats         = new PlayerDamageStats();
            arrowsInMe          = new ArrayList();
            mySkulls            = new ArrayList();
            healCooldown        = 0;
            this.name           = name;
            hitDamage           = damage;
            weaponCooldown      = 0;
            weaponCharge        = 0;
            weaponStrikeDelay   = -1;
            weaponReadyToAction = false;
            weaponInAction      = false;
            className           = "Undefined";
            flag                = null;
            king                = false;
            stunnable           = true;
            stunPower           = 1;
            stunTimeout         = 0;
            maxStunTime         = 10;
        }
Пример #2
0
 public virtual void respawn(float x, float y)
 {
     Health              = healthMax;
     Dead                = false;
     poison              = 0;
     damageStats         = new PlayerDamageStats();
     weaponCooldown      = 0;
     weaponCharge        = 0;
     weaponReadyToAction = false;
     weaponInAction      = false;
     lastHitByPlayer     = -1;
     team                = teamAfterRespawn;
     king                = false;
     X = x;
     Y = y;
     if (flag != null)
     {
         flag.timeToReturn = true;
         flag = null;
     }
     removeMyArrows();
     removeMySkulls(-1);
 }