Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoxingCharacter : MonoBehaviour
{
private Animator animator;
private HitEnemy enemyScript;
// Use this for initialization
void Start()
{
animator = GetComponent<Animator>();
enemyScript = GetComponentInChildren<HitEnemy>();
if (enemyScript != null)
{
enemyScript.isBoxing = false;
}
}
// Update is called once per frame
void Update()
{
bool boxing = Input.GetKey(KeyCode.C);
animator.SetBool("isBoxing", boxing);
if (enemyScript != null)
{
enemyScript.isBoxing = boxing;
}
}
}