Ejemplo n.º 1
0
        protected virtual void Awake()
        {
            anim = GetComponent <Character>().model.GetComponent <Animator>();

            rb           = GetComponent <Rigidbody>();
            detectGround = GetComponent <DetectGround>();

            characterSkill = GetComponent <CharacterSkill>();
            skillHeadButt  = GetComponent <CharacterSkillHeadButt>();
            skillKick      = GetComponent <CharacterSkillKick>();
            skillJump      = GetComponent <CharacterSkillJump>();


            canMove      = true;
            lastPosition = transform.position;
        }
Ejemplo n.º 2
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player1").GetComponent <CharacterSkill>();
     ball   = FindObjectOfType <BallBehaviour>();
 }