Ejemplo n.º 1
0
 protected virtual Fleet CreateFleet(string color)
 {
     if (UserColor == "monster")
     {
         return new MonsterFleet
                {
                    Owner   = this,
                    Caption = this.Name,
                    Color   = color
                }
     }
     ;
     else if (World.NewFleetGenerator != null)
     {
         return(World.NewFleetGenerator(this, color));
     }
     else
     {
         return new Fleet
                {
                    Owner   = this,
                    Caption = this.Name,
                    Color   = color
                }
     };
 }
Ejemplo n.º 2
0
        public virtual void Create()
        {
            if (IsSpawning && !IsAlive && Fleet == null)
            {
                IsSpawning = false;

                IsAlive = true;

                Fleet = World.NewFleetGenerator(this);

                Fleet.SpawnLocation = SpawnLocation;

                /*RemoteEventLog.SendEvent(new AuditEventSpawn
                 * {
                 *  Player = this.ToAuditModelPlayer()
                 * }, World);*/

                InvulnerableUntil = World.Time + World.Hook.ShieldTimeMS;
                IsInvulnerable    = true;

                SpawnTime = World.Time;
            }

            IsStillPlaying = DeadSince > World.Time - World.Hook.PlayerCountGracePeriodMS;
        }