// Use this for initialization
 void Start()
 {
     m_moving = GetComponent<MovingBehaviour>();
     m_phyChar = GetComponent<PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent<MapPathFindingBehaviour>();
     m_animCtrl = GetComponent<CharAnimationController>();
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     m_fAngOff = 360f * Random.value;
     m_player = GameObject.FindGameObjectWithTag("Player");
     m_moving = GetComponent<MovingBehaviour>();
     m_phyChar = GetComponent<PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent<MapPathFindingBehaviour>();
     m_animCtrl = GetComponent<CharAnimationController>();
 }
Exemplo n.º 3
0
    public static void SetCharacterAnimationController(this TileController tc, bool isAnimated = false, float speed = 5)
    {
        CharAnimationController charAnim = tc.gameObject.AddComponent <CharAnimationController>();

        charAnim.LoadSpriteCharSet("SpriteSets/Char/201-blkmage01");
        charAnim.CreateSpriteFrames();

        charAnim.TargetSpriteRenderer = tc.GetView.spriteRenderer;
        charAnim.IsAnimated           = isAnimated;
        charAnim.AnimSpeed            = speed;

        tc.charAnimationController = charAnim;
    }
Exemplo n.º 4
0
 protected void Start()
 {
     m_animCtrl = GetComponent <CharAnimationController>();
 }