private TalkAction() { npcMask = LayerMask.GetMask("NPC"); aiAttribute = GameObject.FindGameObjectWithTag("Player").GetComponent <AIAttribute>(); if (aiAttribute == null) { Debug.Log("玩家没有Player这个标签"); } }
void Awake() { image = GetComponent <SpriteRenderer>(); aiAttribute = GetComponent <AIAttribute>(); }
void Awake() { aiAttribute = GetComponent <AIAttribute>(); //给摄像机动态添加脚本 Camera.main.gameObject.AddComponent <CameraFollow>(); }
public AIController(AIAttribute aiAttribute) { this.aiAttribute = aiAttribute; stateMap = new Dictionary <AIStateEnum, AIState>(); }
// Use this for initialization void Awake() { aiAttribute = GetComponent <AIAttribute>(); anim = GetComponent <Animator>(); }
void Awake() { //自动添加脚本 aiAttribute = GetComponent <AIAttribute>(); }
void Awake() { aiAttribute = GetComponent <AIAttribute>(); npcAnim = GetComponent <NpcAnimation>(); }