Пример #1
0
    private TalkAction()
    {
        npcMask     = LayerMask.GetMask("NPC");
        aiAttribute = GameObject.FindGameObjectWithTag("Player").GetComponent <AIAttribute>();

        if (aiAttribute == null)
        {
            Debug.Log("玩家没有Player这个标签");
        }
    }
Пример #2
0
 void Awake()
 {
     image       = GetComponent <SpriteRenderer>();
     aiAttribute = GetComponent <AIAttribute>();
 }
Пример #3
0
 void Awake()
 {
     aiAttribute = GetComponent <AIAttribute>();
     //给摄像机动态添加脚本
     Camera.main.gameObject.AddComponent <CameraFollow>();
 }
Пример #4
0
 public AIController(AIAttribute aiAttribute)
 {
     this.aiAttribute = aiAttribute;
     stateMap         = new Dictionary <AIStateEnum, AIState>();
 }
Пример #5
0
 // Use this for initialization
 void Awake()
 {
     aiAttribute = GetComponent <AIAttribute>();
     anim        = GetComponent <Animator>();
 }
Пример #6
0
 void Awake()
 { //自动添加脚本
     aiAttribute = GetComponent <AIAttribute>();
 }
Пример #7
0
 void Awake()
 {
     aiAttribute = GetComponent <AIAttribute>();
     npcAnim     = GetComponent <NpcAnimation>();
 }