コード例 #1
0
    public static GetOnBoatAndShore GetSSAction(GameObject role)
    {
        GetOnBoatAndShore action = ScriptableObject.CreateInstance <GetOnBoatAndShore>();

        action.role = role;
        return(action);
    }
コード例 #2
0
ファイル: CCActionManager.cs プロジェクト: zhangzien/Unity3d
    protected new void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;

            if (Physics.Raycast(ray, out hit))
            {
                if (hit.transform.tag == "Devil" || hit.transform.tag == "Priest")
                {
                    role = GetOnBoatAndShore.GetSSAction(hit.collider.gameObject);
                    this.RunAction(hit.collider.gameObject, role, this);
                }
                else if (hit.transform.tag == "Boat")
                {
                    boat = CCMoveToAction.GetSSAction();
                    this.RunAction(hit.collider.gameObject, boat, this);
                }
            }
        }
        base.Update();
        //foreach(KeyValuePair<int,GameObject> obj in sceneController.getShoreLeft())
    }