blob: 5ca87e699e070c8d8049065f5f19c6d3ab3b7e50 (
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
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace WK
{
/// <summary>
/// 玩家角色根节点
/// </summary>
public sealed class PlayerController : INotification
{
/// <summary>
/// 角色所有当前数值集合
/// </summary>
private CharacterInfo m_CharacterInfo;
public CharacterInfo info { get { return m_CharacterInfo; } }
/// <summary>
/// 角色行为逻辑
/// </summary>
private CharacterBehaviour m_CharacterBehaviour;
public CharacterBehaviour behaviour { get { return m_CharacterBehaviour; } }
/// <summary>
/// gameobject根节点
/// </summary>
private GameObject m_GameObject;
public GameObject gameObject { get { return m_GameObject;} }
public void OnCreate()
{
}
/// <summary>
/// 逻辑更新
/// </summary>
public void OnUpdate()
{
// preupdate
behaviour.OnPreUpdate();
// update
info.OnUpdate();
behaviour.OnUpdate();
// post update
behaviour.OnPostUpdate();
}
}
}
|