Skip to content
Snippets Groups Projects
Commit 6ca49956 authored by Jacky Chen's avatar Jacky Chen
Browse files

Added Player Attack - Code

parent 7697d2e9
Branches master
No related tags found
No related merge requests found
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Angel_Attack : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown("1"))
{
GetComponent<Animator> ().SetTrigger("Smack");
GetComponent<Transform>().position = new Vector2(2.85f, 0.77f);
}
}
void returnBack()
{
GetComponent<Transform>().position = new Vector2(-5.74f, 0.74f);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment