// Use this for initialization
 void Start()
 {
     Ator = gameObject.GetComponent <Animator>();
     //获取动画控制器
     moveAvatar = transform.parent.GetComponent <MoveAvatar>();
     //获取GOMap中移动角色的脚本
 }
Exemplo n.º 2
0
    //储存角色的移动类 为了获取角色的移动状态

    // Use this for initialization
    void Start()
    {
        ator = gameObject.GetComponent <Animator>();
        //获取角色的动画控制器组件

        moveAvatar = transform.parent.GetComponent <MoveAvatar>();
        //获取父物体(角色控制器)上的角色移动类
    }
Exemplo n.º 3
0
        // Team,
        //Bank,
        //TradingPost,
        //Markt,
        //Schatkist,
        //SchatkistEnemy
        // EnemyPlein,
        //Enemy
        /// <summary>
        /// Initialises the class.
        /// </summary>
        private void Start()
        {
            InitializeUI();

            tag = "Player";

            //Rigidbody2D rigidbody = gameObject.AddComponent<Rigidbody2D>();
            //rigidbody.isKinematic = true;

            Camera.main.GetComponent <AudioListener>().enabled = true;

            MoveAvatar ma = gameObject.AddComponent <MoveAvatar>();

            ma.isPlayer = true;

            CurrentGame.Instance.UIPlayer = this;
            //GameManager.s_Singleton.DistrictManager.mPlayerTrans = transform;
        }
Exemplo n.º 4
0
 private void Start()
 {
     avatar = new MoveAvatar();
     avatar.ChangeToDualColumn(actors.Count, Vector2.one, MoveDir);
     SetPos();
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     m_animator   = m_avaterObj.GetComponent <Animator>();
     m_moveAvatar = this.GetComponent <MoveAvatar>();
     StartCoroutine(_AvaterAnimate());
 }