Exemple #1
0
    private SpiderData data;                    //侦察兵的数据


    public static GoSpiderAction GetSSAction(Vector3 location)
    {
        GoSpiderAction action = CreateInstance <GoSpiderAction>();

        action.pos_x       = location.x;
        action.pos_z       = location.z;
        action.move_length = Random.Range(4, 7);
        return(action);
    }
Exemple #2
0
 public void SSActionEvent(SSAction source, int intParam = 0, GameObject objectParam = null)
 {
     if (intParam == 0)
     {
         SpiderFollowAction follow = SpiderFollowAction.GetSSAction(objectParam.gameObject.GetComponent <SpiderData>().player);
         this.RunAction(objectParam, follow, this);
     }
     else
     {
         GoSpiderAction move = GoSpiderAction.GetSSAction(objectParam.gameObject.GetComponent <SpiderData>().start_position);
         this.RunAction(objectParam, move, this);
         Singleton <GameEventManager> .Instance.PlayerEscape();
     }
 }
Exemple #3
0
 public void GoSpider(GameObject spider)
 {
     go_spider = GoSpiderAction.GetSSAction(spider.transform.position);
     this.RunAction(spider, go_spider, this);
 }