Beispiel #1
0
        //
        // 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;
        }
Beispiel #2
0
 //public MyLevel myLevel;
 public MyTeamReviver(PlayerCorpse corpse, TeamReviver.Modes mode) : base(corpse, mode)
 {
     //myLevel = (Engine.Instance.Scene as MyLevel);
 }