Exemplo n.º 1
0
    void Start()
    {
        cameraHandle = transform.parent.gameObject;
        playerHandle = cameraHandle.transform.parent.gameObject;
        tempEulerX   = 20.0f;
        ActorContorller ac = playerHandle.GetComponent <ActorContorller> ();

        model = ac.model;
        pi    = ac.pi;

        if (!IsAI)
        {
            camera1         = Camera.main.gameObject;
            lockDot.enabled = false;

            //锁定鼠标
            //Cursor.lockState = CursorLockMode.Locked;
        }

        lockState = false;
    }
Exemplo n.º 2
0
    void Awake()
    {
        ac = GetComponent <ActorContorller> ();

        GameObject model  = ac.model;
        GameObject sensor = null;

        try{
            sensor = transform.Find("sensor").gameObject;
        }catch (System.Exception ex) {
            //
            // If there is no "sensor" object.
            //
        }
        bm = Bind <BattleManager> (sensor);
        wm = Bind <WeaponManager> (model);
        sm = Bind <StateManager> (gameObject);
        dm = Bind <DirectorManager> (gameObject);
        im = Bind <InteractionManager> (sensor);


        ac.OnAction += DoAction;
    }
Exemplo n.º 3
0
 void Awake()
 {
     anim  = GetComponent <Animator>();
     actor = GetComponentInParent <ActorContorller>();
 }