Exemple #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,GameName,Tags")] GameM gameM)
        {
            if (id != gameM.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(gameM);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!GameMExists(gameM.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(gameM));
        }
    // Start is called before the first frame update
    void Start()
    {
        AM = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>();
        GM = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameM>();

        AM.Play("LevelCleared");
    }
    // Start is called before the first frame update
    void Start()
    {
        GameManager      = GameObject.FindGameObjectWithTag("GameManager");
        GM               = GameManager.GetComponent <GameM>();
        GM.previousScene = 1;
        battleStates     = PerformAction.WAIT;
        aManager.StopPlaying("LevelMusic");
        aManager.Play("BattleMusic");

        EnemiesInBattle.AddRange(GameObject.FindGameObjectsWithTag("Enemy"));
        CharsInBattle.AddRange(GameObject.FindGameObjectsWithTag("Player"));
        AllCharsInBattle.AddRange(GameObject.FindGameObjectsWithTag("Player"));
        Time.timeScale = 1f;
        playerInput    = PlayerUI.ACTIVATE;

        AttackPanel.SetActive(false);
        EnemySelectPanel.SetActive(false);
        SpecialPanel.SetActive(false);
        ItemPanel.SetActive(false);
        CostPanel.SetActive(false);

        EnemiesInBattle.Sort(SortByName);

        SetupBattle();
        SetStats();
    }
    // Start is called before the first frame update
    void Start()
    {
        GM = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameM>();

        player       = GameObject.FindGameObjectWithTag("Player");
        playerScript = player.GetComponent <Player>();
        dancePanel   = GameObject.FindGameObjectWithTag("DancePanel");
    }
        public GameVM()
        {
            MyGame = new GameM();

            LoadData();

            _changeNameCommand = new RelayCommand(ChangeName);
        }
Exemple #6
0
        public async Task <IActionResult> Create([Bind("Id,GameName,Tags")] GameM gameM)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gameM);
                await _context.SaveChangesAsync();

                return(Redirect("/Home/Index"));
            }
            return(View(gameM));
        }
 // Start is called before the first frame update
 void Start()
 {
     player          = GameObject.FindGameObjectWithTag("Player");
     rb              = gameObject.GetComponent <Rigidbody2D>();
     playerScript    = player.GetComponent <Player>();
     GM              = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameM>();
     playerHitboxATK = GameObject.FindGameObjectWithTag("PlayerHitBox");
     playerATK       = playerHitboxATK.GetComponent <BoxCollider2D>();
     canvas          = GameObject.FindGameObjectWithTag("Canvas");
     ftUI            = canvas.GetComponent <FirstTurn>();
     playerHitBox    = player.GetComponent <BoxCollider2D>();
 }
Exemple #8
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
         return;
     }
     DontDestroyOnLoad(gameObject);
 }
Exemple #9
0
    // Use this for initialization
    void Start()
    {
        animator = transform.GetChild(0).gameObject.GetComponent <Animator>();
        //GameMの読み込み
        gameM = GameObject.Find("Canvas").GetComponent <GameM>();

        //A,Bボタンの設定
        attacks[0] = new List <int>(); attacks[1] = new List <int>();

        attacks[0].Add(0);
        attacks[0].Add(1);
        attacks[0].Add(0);

        attacks[1].Add(0);
    }
    // Start is called before the first frame update
    void Start()
    {
        currenState = TurnState.PROCESSING;
        BSM         = GameObject.FindGameObjectWithTag("BattleManager").GetComponent <BattleStateMachine>();
        GM          = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameM>();
        startPos    = transform.position;

        if (!GM.firstTurn)
        {
            curCooldown = maxCooldown - 1;
        }
        else
        {
            curCooldown = 0f;
        }
    }
Exemple #11
0
    // Start is called before the first frame update
    void Start()
    {
        rb           = gameObject.GetComponent <Rigidbody2D>();
        anim         = gameObject.GetComponent <Animator>();
        healthScript = health.GetComponent <GUIScript>();
        GM           = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameM>();
        timer        = 0.0f;
        dance        = false;
        dancePanel.SetActive(false);
        currDancePower = danceStonePower.NOTHING;

        transform.position = GM.startPos;

        DestroyNearestEnemy();

        aManager.StopPlaying("BattleMusic");
        aManager.Play("LevelMusic");
        GM.previousScene = 0;
    }
Exemple #12
0
    // Start is called before the first frame update
    void Start()
    {
        pointer.SetActive(false);
        startPos = transform.position;
        anim.SetInteger("State", 0);//idle
        anim.SetBool("Combat", true);
        currentState = TurnState.PROCESSING;
        BSM          = GameObject.FindGameObjectWithTag("BattleManager").GetComponent <BattleStateMachine>();
        GM           = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameM>();
        hpText       = hpTextBar.GetComponent <Text>();
        spText       = spTextBar.GetComponent <Text>();

        if (GM.firstTurn)
        {
            curCooldown = maxCooldown - 5 + (player.currSPD / 10);
        }
        else
        {
            curCooldown = 0f;
        }
    }
Exemple #13
0
 void Awake()
 {
     thisM = this;
 }
Exemple #14
0
 public void SetCountDownNow()
 {
     GMS = GameObject.Find("GameManager").GetComponent <GameM>();
     GMS.counterDownDone = true;
 }
Exemple #15
0
 // Use this for initialization
 void Start()
 {
     GameManagerScript = GameObject.Find("gameManager").GetComponent <GameM>();
     GameManagerScript.Cur_Bricks++;
 }
Exemple #16
0
 // Use this for initialization
 void Start()
 {
     GameManagerScript = GameObject.Find("gameManager").GetComponent <GameM>();
     SpawnBall();
 }
Exemple #17
0
 public void Awake()
 {
     Instance = this;
 }
 // Start is called before the first frame update
 void Start()
 {
     GM = GameObject.Find("GameManagerP").GetComponent <GameM>();
 }