Esempio n. 1
0
 public FollowNav(BoyController boy, NavManage nav)
 {
     //this.cat = cat;
     this.boy = boy;
     ai       = boy.GetComponent <BoyAI>();
     this.nav = nav;
 }
Esempio n. 2
0
    //创建的时候初始化
    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);
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     ai            = GameManager.Instance.boy.GetComponent <BoyAI>();
     interestLayer = LayerMask.GetMask(LayerName.Ground, LayerName.Platform, LayerName.Danger, LayerName.Floating);
 }
Esempio n. 4
0
 public FollowDirect(BoyController boy)
 {
     //this.cat = cat;
     this.boy = boy;
     ai       = boy.GetComponent <BoyAI>();
 }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     ai         = GameManager.Instance.boy.GetComponent <BoyAI>();
     jd         = transform.parent.Find("JumpDetectorBody").GetComponent <JumpDetectorBody>();
     tempMother = GameManager.Instance.temp.transform;
 }
Esempio n. 6
0
 // Use this for initialization
 void Start()
 {
     cat = GameManager.Instance.Player.transform;
     boy = transform;
     ai  = GetComponent <BoyAI>();
 }