示例#1
0
    public DBCamera GetDBCamera(int id)
    {
        DBCamera db = null;

        DictCamera.TryGetValue(id, out db);
        return(db);
    }
示例#2
0
 private void Start()
 {
     m_camera         = DBCamera.GetCamera;
     m_charController = this.gameObject.GetComponent <CharacterController>();
     if (m_charController == null)
     {
         m_charController = this.gameObject.AddComponent <CharacterController>();
     }
 }
示例#3
0
    private const float MOVEMENT_STOP_SPEED = 3f;     // how fast the camera's movement comes to a stop when an axis is zero

    #endregion

    void Awake()
    {
        //if the static instance of this camera is null, assign it
        if (m_instance == null)
        {
            m_instance = this;
        }

        //assign the states that this camera object will use
        m_stateMachine = new StateMachineBase();
        m_followState  = new State_Camera_Follow(this);
        m_orbitState   = new State_Camera_Orbit(this);

        //store the initial values for resetting the camera's position later.
        SetDefaultValues();
    }
 public State_Camera_Follow(DBCamera pCamera)
 {
     m_camera = pCamera;
 }
示例#5
0
    public State_Camera_Orbit(DBCamera pCamera)
    {
        m_camera = pCamera;
//		m_targetTransform = m_camera.CameraTarget;
    }