summaryrefslogtreecommitdiff
path: root/GameCode/PlayerAIWilhelm.cs
blob: b71a530f5f1b25a42508a24c06d840194cd2a3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using UnityEngine;

public class PlayerAIWilhelm : MonoBehaviour
{
	private PlayerAPI api;

	private void Start()
	{
		api = GetComponentInParent<PlayerAPI>();
	}

	private void Update()
	{
		api.Move(api.TowardsOtherPlayer());
		api.SetAimDirection(api.TowardsOtherPlayer() + api.GetOtherPlayer().data.playerVel.velocity * 0.1f);
		api.Attack();
		api.Jump();
		api.Block();
	}
}