示例#1
0
        public override void onStart()
        {
            //This code runs when the GameObject is initialized
            Wall wall = Objects.getObject <Wall>("WALLPIPE");

            wall.Active = false;
            wall.X      = 10100;

            target    = Objects.getObject <DebugObject>("Phase1CameraSpot");
            water     = Objects.getObject <WaterBlock>("WaterBlock1");
            camMaster = Objects.getObject <CameraMaster>("CameraMaster1");
            //camMaster.getScript("CameraMasterControl").Active = false;

            obj                     = new SimpleObject(Level);
            obj.Position            = Gob.Position;
            obj.Sprite.Color        = Color.Red;
            obj.Sprite.Visible      = false;
            camMaster.Target        = obj.Name;
            camMaster.ObeyCamZones  = false;
            Level.Camera.TargetZoom = .55f;
        }
示例#2
0
        public override void onStart()
        {
            Log.debug("DOOR START");
            door  = Objects.getObject <Wall>("doorA");
            water = Objects.getObject <WaterBlock>("WaterBlock1");
            plr   = Objects.getObject <Player>("Player1");


            plr.getScript("PlayerMove").Active = false;
            plr.Velocity     = Vector.Zero;
            plr.Acceleration = Vector.Zero;

            camMaster = Objects.getObject <CameraMaster>("CameraMaster1");
            //camMaster.getScript("CameraMasterControl").Active = false;

            obj                    = new SimpleObject(Level);
            obj.Position           = Gob.Position - Vector.UnitX * 1000;
            obj.Sprite.Color       = Color.Red;
            obj.Sprite.Visible     = false;
            camMaster.Target       = obj.Name;
            camMaster.ObeyCamZones = false;

            objVel = (door.Position - obj.Position).UnitSafe * 25f;
        }