コード例 #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));
        }
コード例 #2
0
    // 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");
    }
コード例 #3
0
    // 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();
    }
コード例 #4
0
    // 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");
    }
コード例 #5
0
        public GameVM()
        {
            MyGame = new GameM();

            LoadData();

            _changeNameCommand = new RelayCommand(ChangeName);
        }
コード例 #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));
        }
コード例 #7
0
 // 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>();
 }
コード例 #8
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
         return;
     }
     DontDestroyOnLoad(gameObject);
 }
コード例 #9
0
ファイル: Bodybehaviour.cs プロジェクト: cYa9-inu/sotuken
    // 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);
    }
コード例 #10
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;
        }
    }
コード例 #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;
    }
コード例 #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;
        }
    }
コード例 #13
0
 void Awake()
 {
     thisM = this;
 }
コード例 #14
0
 public void SetCountDownNow()
 {
     GMS = GameObject.Find("GameManager").GetComponent <GameM>();
     GMS.counterDownDone = true;
 }
コード例 #15
0
ファイル: Brick_blue.cs プロジェクト: bodyisnumb/Arkanoid2D
 // Use this for initialization
 void Start()
 {
     GameManagerScript = GameObject.Find("gameManager").GetComponent <GameM>();
     GameManagerScript.Cur_Bricks++;
 }
コード例 #16
0
ファイル: Bat.cs プロジェクト: bodyisnumb/Arkanoid2D
 // Use this for initialization
 void Start()
 {
     GameManagerScript = GameObject.Find("gameManager").GetComponent <GameM>();
     SpawnBall();
 }
コード例 #17
0
ファイル: GameM.cs プロジェクト: christianamaury/SantaGiftRun
 public void Awake()
 {
     Instance = this;
 }
コード例 #18
0
 // Start is called before the first frame update
 void Start()
 {
     GM = GameObject.Find("GameManagerP").GetComponent <GameM>();
 }