blob: ba12b3f5c04c86fec4c1a3cb712083a9decd428e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 玩家角色控制器
[DisallowMultipleComponent]
public class PCController : UnitController
{
public static PCController instance;
private UnitAfterImage unitAfterImage;
public override UnitType type { get { return UnitType.PC; } }
private void Awake()
{
instance = this;
}
public override void Initialize(GameObject obj, string folder)
{
base.Initialize(obj, folder);
unitState = gameObject.GetOrAddComponent<PCState>();
unitState.Initialize();
unitAnimation = gameObject.GetOrAddComponent<PCAnimation>();
unitAnimation.Initialize();
unitAfterImage = gameObject.GetOrAddComponent<UnitAfterImage>();
unitAfterImage.Initialize();
}
public override void Update()
{
base.Update();
unitAfterImage.OnUpdate();
}
public override void OnHit(CollisionInfo info)
{
}
public override void OnGetHit(CollisionInfo info)
{
}
public override void OnGrab()
{
}
public override void OnPull()
{
}
}
|