public FollowNav(BoyController boy, NavManage nav) { //this.cat = cat; this.boy = boy; ai = boy.GetComponent <BoyAI>(); this.nav = nav; }
//创建的时候初始化 public void Init() { //经测试,Init放到start里边不能及时执行。因为此对象是在一帧间隔中创建,会在这帧的Update最后(LateUpate之前)调用start。 ai = GameManager.Instance.boy.GetComponent <BoyAI>(); interestingLayer = LayerMask.GetMask(LayerName.Ground, LayerName.Platform, LayerName.Danger, LayerName.Default, LayerName.Floating); layerCollision = LayerMask.GetMask(LayerName.Ground, LayerName.Platform); layerGround = LayerMask.GetMask(LayerName.Ground); }
// Use this for initialization void Start() { ai = GameManager.Instance.boy.GetComponent <BoyAI>(); interestLayer = LayerMask.GetMask(LayerName.Ground, LayerName.Platform, LayerName.Danger, LayerName.Floating); }
public FollowDirect(BoyController boy) { //this.cat = cat; this.boy = boy; ai = boy.GetComponent <BoyAI>(); }
// Use this for initialization void Start() { ai = GameManager.Instance.boy.GetComponent <BoyAI>(); jd = transform.parent.Find("JumpDetectorBody").GetComponent <JumpDetectorBody>(); tempMother = GameManager.Instance.temp.transform; }
// Use this for initialization void Start() { cat = GameManager.Instance.Player.transform; boy = transform; ai = GetComponent <BoyAI>(); }