Ejemplo n.º 1
0
        protected override void Initialize()
        {
            base.Initialize();

            var gameplayScene = new GameplayScene();

            Core.Scene = gameplayScene;
        }
Ejemplo n.º 2
0
        static void Main()
        {
            using (var game = new SceneManager(1280, 720))
            {
                GameplayScene gs = new GameplayScene();
                game.AddScene(gs);
                //TODO: add more scenes

                game.StartScene(gs.SceneName);
                game.Run();
            }
        }
Ejemplo n.º 3
0
        public override void Process(Entity entity)
        {
            var fc = entity.GetComponent <FighterComponent>();

            if (fc.ResetInput.IsPressed)
            {
                var gameplayScene = new GameplayScene();

                Core.StartSceneTransition(
                    new FadeTransition(() => new GameplayScene()));
            }
        }
Ejemplo n.º 4
0
        public override void render(Graphics graphics, Camera camera)
        {
            GameplayScene Sc = (GameplayScene)Core.scene;

            if (ItemPickupSystem.Money <= 0 || Sc != null && !Sc.IntroTimer.IsFinished())
            {
                return;
            }

            S.play(Animation.Idle);

            S.localOffset = new Vector2(8, 0);

            for (int Amount = 0; Amount < ItemPickupSystem.Money; Amount++)
            {
                S.localOffset -= new Vector2(8, 0);

                S.render(graphics, camera);
            }
        }
Ejemplo n.º 5
0
 protected override void OnDestroy()
 {
     base.OnDestroy ();
     mCurrent = null;
 }
Ejemplo n.º 6
0
    //callback when this was initialize
    protected override void Awake()
    {
        mCurrent = this;

        base.Awake ();

        if( mCurrentPlayer == null)
            mCurrentPlayer = mOwnerPlayer;

        if( mOwnerInfo == null )
        {
            mOwnerInfo = GameHelpers.GetLocalPlayerInfo();
            mOpponentInfo = mOwnerInfo;
        }

        mGameinfo = new GameInfo( mOwnerInfo, mOpponentInfo, 0, 0);
        ownerPlayer.info = mOwnerInfo;
        opponentPlayer.info = mOpponentInfo;

        mPlayerController = (PlayerController)FindObjectOfType( typeof(PlayerController));
    }
Ejemplo n.º 7
0
 public void ShowFinalScene()
 {
     EndScene.SetActive(true);
     StartScene.SetActive(false);
     GameplayScene.SetActive(false);
 }
Ejemplo n.º 8
0
 public void ShowGameplayScene()
 {
     GameplayScene.SetActive(true);
     StartScene.SetActive(false);
     EndScene.SetActive(false);
 }