// Use this for initialization void Start() { m_moving = GetComponent<MovingBehaviour>(); m_phyChar = GetComponent<PhysicCharBehaviour>(); m_pathFindingBehaviour = GetComponent<MapPathFindingBehaviour>(); m_animCtrl = GetComponent<CharAnimationController>(); }
// 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>(); }
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; }
protected void Start() { m_animCtrl = GetComponent <CharAnimationController>(); }