コード例 #1
0
    public static CCCatchUpAction getAction(GameObject target, float speed)
    {
        CCCatchUpAction action = ScriptableObject.CreateInstance <CCCatchUpAction>();

        action.target = target;
        action.speed  = speed;
        return(action);
    }
コード例 #2
0
    public void CatchUp(GameObject patrol, GameObject player)
    {
        if (actions.ContainsKey(patrol.GetComponent <Patrol>().area))
        {
            actions[patrol.GetComponent <Patrol>().area].destroy = true;
        }
        CCCatchUpAction action = CCCatchUpAction.getAction(player, 1.5f);

        addAction(patrol.gameObject, action, this);
    }