Пример #1
0
 public ArcadeLevel(string name)
     : base(name)
 {
     this._followCam               = new FollowCam();
     this._followCam.lerpMult      = 2f;
     this._followCam.startCentered = false;
     this.camera = (Camera)this._followCam;
 }
 public ChallengeLevel(string name)
     : base(name)
 {
     this._followCam               = new FollowCam();
     this._followCam.lerpMult      = 1f;
     this._followCam.startCentered = false;
     this.camera          = (Camera)this._followCam;
     this.simulatePhysics = false;
 }
 public ChallengeLevel(LevelData data, bool validityTest)
     : base(data)
 {
     this._followCam               = new FollowCam();
     this._followCam.lerpMult      = 1f;
     this._followCam.startCentered = false;
     this.camera          = (Camera)this._followCam;
     this.simulatePhysics = false;
     this._levelData      = data;
     this._validityTest   = validityTest;
 }
Пример #4
0
 public GameLevel(string lev, int seedVal = 0, bool validityTest = false, bool editorTestMode = false)
     : base(lev)
 {
     this.levelInputString    = lev;
     this._followCam          = new FollowCam();
     this._followCam.lerpMult = 1.2f;
     this.camera        = (Camera)this._followCam;
     this._validityTest = validityTest;
     if (Network.isActive)
     {
         this._readyForTransition = false;
     }
     if (seedVal == 0)
     {
         seedVal = Rando.Int(2147483646);
     }
     this.seed            = seedVal;
     this._editorTestMode = editorTestMode;
 }
Пример #5
0
        // Token: 0x06001988 RID: 6536
        protected override bool OnDestroy(DestroyType type = null)
        {
            if (!base.isServerForObject)
            {
                return(false);
            }
            ATRCShrapnel atrcshrapnel = new ATRCShrapnel();

            atrcshrapnel.MakeNetEffect(this.position, false);
            List <Bullet> list = new List <Bullet>();

            for (int i = 0; i < 20; i++)
            {
                float num = (float)i * 18f - 5f + Rando.Float(10f);
                atrcshrapnel       = new ATRCShrapnel();
                atrcshrapnel.range = 55f + Rando.Float(14f);
                Bullet bullet = new Bullet(base.x + (float)(Math.Cos((double)Maths.DegToRad(num)) * 6.0), base.y - (float)(Math.Sin((double)Maths.DegToRad(num)) * 6.0), atrcshrapnel, num, null, false, -1f, false, true);
                bullet.firedFrom = this;
                list.Add(bullet);
                Level.Add(bullet);
            }
            if (Network.isActive)
            {
                Send.Message(new NMFireGun(null, list, 0, false, 4, false), NetMessagePriority.ReliableOrdered, null);
                list.Clear();
            }
            Level.Remove(this);
            FollowCam followCam = Level.current.camera as FollowCam;

            if (followCam != null)
            {
                followCam.Remove(this);
            }
            if (Recorder.currentRecording != null)
            {
                Recorder.currentRecording.LogBonus();
            }
            return(true);
        }