コード例 #1
0
        public void CreateGamePlayers()
        {
            GameObject   gamePlayer = null;
            Transform    tf         = null;
            UIGamePlayer script     = null;

            for (int i = 0; i < RoomModel.MAX_GAME_PLAYER_COUNT; i++)
            {
                gamePlayer = Instantiate(gamePlayerPrefab, Vector3.zero, Quaternion.identity);
                tf         = gamePlayer.transform;

                tf.SetParent(gamePlayersParent.transform);
                tf.localPosition = positions[i];
                tf.localScale    = new Vector2(2, 2);

                script            = gamePlayer.GetComponent <UIGamePlayer>();
                script.ChairIndex = i;
                script.view       = this;

                SetTimelineUI(script);

                gamePlayer.SetActive(false);
                this.gamePlayers[i] = script;
            }
        }
コード例 #2
0
ファイル: EnemyBoss.cs プロジェクト: mcunha-br/CursoTwitch
    protected new void Start()
    {
        base.Start();

        uIGamePlayer = FindObjectOfType <UIGamePlayer>();

        uIGamePlayer.SetConfigEnemy(health, enemyName, true);
    }
コード例 #3
0
        public void OnUpateUI(GamePlayerModel model)
        {
            UIGamePlayer component = GetGamePlayersByChairIndex(model.chairIndex);

            if (component != null)
            {
                component.UpdateGamePlayer(model);
            }
        }
コード例 #4
0
        public void ShowOwnCards(int chairIndex)
        {
            UIGamePlayer component = GetGamePlayersByChairIndex(chairIndex);

            if (component != null)
            {
                component.ShowOwnCard();
                component.ShowDelarMark();
            }
        }
コード例 #5
0
        public UIGamePlayer GetGamePlayersByChairIndex(int chairIndex)
        {
            UIGamePlayer gamePlayer = null;

            if (chairIndex >= 0 && chairIndex <= this.gamePlayers.Length - 1)
            {
                gamePlayer = this.gamePlayers[chairIndex];
            }
            return(gamePlayer);
        }
コード例 #6
0
 private void SetTimelineUI(UIGamePlayer script)
 {
     script.SetTimeLine(timelineAnimationControllers[0]);
 }