コード例 #1
0
ファイル: PlayerGhost.cs プロジェクト: kadenkat/TF-8-Player
        public MyPlayerGhost(PlayerCorpse corpse) : base(corpse)
        {
            ownerCorpse    = (MyPlayerCorpse)corpse;
            characterIndex = ownerCorpse.PlayerIndex;
            archerSounds   = TowerFall.ArcherData.Archers[characterIndex].SFX;
            haloProperties.SaveProperties(halo);

            this.arrowPickupHitbox = new WrapHitbox(22f, 30f, -11f, -16f);
        }
コード例 #2
0
 public MyPlayerGhost(PlayerCorpse corpse)
     : base(corpse)
 {
     this.corpse       = corpse;
     this.Allegiance   = corpse.Allegiance;
     this.shield       = new PlayerGhostShield(this);
     this.shieldHitbox = new WrapHitbox(16f, 18f, -8f, -10f);
     base.Add(this.shield);
     this.shieldRegenCounter = new Counter(240);
 }
コード例 #3
0
ファイル: MyTeamReviver.cs プロジェクト: liruenth/Bartizan
        //
        // Constructors
        //
        public MyTeamReviver(PlayerCorpse corpse, TeamReviver.Modes mode, bool ghostRevives = false) : base(corpse.BottomCenter)
        {
            this.ghostRevives = ghostRevives;
            this.Mode         = mode;
            this.Corpse       = corpse;
            this.ScreenWrap   = true;
            base.Tag(new GameTags[] {
                GameTags.LightSource,
                GameTags.Dummy                 // Using this tag because it doesn't appear in 8-player
            });
            this.LightRadius        = 60f;
            this.LightAlpha         = 1f;
            base.Collider           = (this.normalHitbox = new WrapHitbox(24f, 25f, -12f, -20f));
            this.revivingHitbox     = new WrapHitbox(40f, 46f, -20f, -30f);
            this.playerNomralHitbox = new WrapHitbox(8f, 14f, -4f, -6f);
            this.reviveCounter      = (float)this.ReviveTime;
            base.Add(this.sine      = new SineWave(90));
            base.Add(this.arrowSine = new SineWave(20));
            switch (this.Mode)
            {
            case TeamReviver.Modes.TeamDeathmatch:
                this.arrowColor      = (this.colorA = ArcherData.Get(corpse.TeamColor).ColorA);
                this.colorB          = ArcherData.Get(corpse.TeamColor).ColorB;
                this.PlayerCanRevive = true;
                break;

            case TeamReviver.Modes.DarkWorld: {
                ArcherData archerData = ArcherData.Get(TFGame.Characters [corpse.PlayerIndex], TFGame.AltSelect [corpse.PlayerIndex]);
                this.arrowColor      = (this.colorA = archerData.ColorA);
                this.colorB          = archerData.ColorB;
                this.PlayerCanRevive = true;
                break;
            }

            case TeamReviver.Modes.Quest: {
                ArcherData archerData = ArcherData.Get(TFGame.Characters [corpse.PlayerIndex], TFGame.AltSelect [corpse.PlayerIndex]);
                this.arrowColor      = (this.colorA = archerData.ColorA);
                this.colorB          = archerData.ColorB;
                this.PlayerCanRevive = false;
                break;
            }
            }
            Alarm.Set(this, 60, delegate {
                this.canRevive = true;
            }, Alarm.AlarmMode.Oneshot);
            this.targetLightAlpha = 1f;
        }