示例#1
0
 void Awake()
 {
     Instance     = this;
     _transform   = transform;
     materials    = new ArrayList();
     materialsOrg = new ArrayList();
 }
示例#2
0
 void Awake()
 {
     characterMesh       = GameObject.Find("MainChar") as GameObject;
     CharacterController = GetComponent("CharacterController") as CharacterController;
     Instance            = this;
     TP_Camera.UseExistingOrCreateNewMainCamera();
 }
示例#3
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
示例#4
0
 void Awake()
 {
     CharacterController = GetComponent("CharacterController") as CharacterController;
     Instance            = this;
     TP_Camera.AttachCamera();
     _transform = transform;
 }
示例#5
0
 void Awake()
 {
     Instance          = this;
     _transform        = transform;
     materials         = new ArrayList();
     materialsOrg      = new ArrayList();
     transparentShader = Shader.Find("Transparent/Diffuse");
 }
    void Awake()
    {
        S = this;

        // CAMERA SHAKE ###################
        //if (camTransform == null) camTransform = GetComponent(typeof(Transform)) as Transform;
        cameraTransform = this.transform;
    }
示例#7
0
    public float deadZone = 0.1f;     // holds dead space (AKA responsiveness to input)

    void Awake()
    {
        _characterController = GetComponent <CharacterController>();
        _instance            = this;

        // Use Exsiting Or Create New Main Camera
        TP_Camera.UseExisitingOrCreateNewMainCamera();
    }
示例#8
0
    void Awake()
    {
        S = this;

        // CAMERA SHAKE ###################
        //if (camTransform == null) camTransform = GetComponent(typeof(Transform)) as Transform;
        cameraTransform = this.transform;
    }
示例#9
0
    CharacterController controller;     //the character controller attached the the character


    void Awake()
    {
        //get the character controller component
        controller = GetComponent("CharacterController") as CharacterController;                //cast the return value of getComponent to type CharacterController
        //Debug.Log("Got the character controller");

        TP_Camera.UseExistingOrCreateNewMainCamera();           //call method from TP_Camera
    }
示例#10
0
    // Awake is called before Start
    void Awake()
    {
        characterController = GetComponent <CharacterController>();
        instance            = this;

        // Using the old camera system
        TP_Camera.UseExistingOrCreateNewMainCamera();
    }
示例#11
0
 // Use this for initialization
 void Awake()
 {
     // assign references into our static fields
     CharacterController = GetComponent("CharacterController") as CharacterController;
     Instance            = this;
     // performs initial camera check  - exists?
     TP_Camera.UseExistingOrCreateNewMainCam();
 }
示例#12
0
 void Awake()
 {
     CController = GetComponent("CharacterController") as CharacterController;
     Instance    = this;
     if (UseTPCamera)
     {
         TP_Camera.UseExistingOrCreateNewMainCamera();
     }
 }
示例#13
0
    void Awake()
    {
        if (instance != null)
        {
            Debug.Log("Instance of TP_Camera already exists");
            return;
        }

        instance = this;
    }
示例#14
0
    // Awake is called before Start
    void Awake()
    {
        instance = this;

        trans = GetComponent <Transform>();
        gun   = GameObject.Find("Player/Model_Player/Gun");
        // Lock screen cursor
        Cursor.lockState = cursorMode;
        //gun.SetActive(false);
    }
    void Awake()
    {
        Instance = this;

        CharController        = GetComponent("CharacterController") as CharacterController;
        CharController.height = 0.12f;
        CharController.radius = 0.02f;
        CharController.center = new Vector3(0, 0.06f, 0);

        TP_Camera.SetupCamera();
    }
示例#16
0
 void Start()
 {
     rb = GetComponentInChildren <Rigidbody>();
     TP_Camera.UseExistingOrCreateNewMainCamera();
     carryingController = GetComponent <CarryingController>();
     myPhotonView       = GetComponent <PhotonView> ();
     if (name == "Em")
     {
         emAbility = GetComponent <EmAbilityBehavior>();
     }
 }
示例#17
0
    void Awake()
    {
        if (instance != null)
        {
            Debug.Log("Instance of TP_Controller already exists");
            return;
        }

        instance = this;

        characterController = GetComponent <CharacterController>();
        TP_Camera.CreateCamera();
    }
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            Debug.Log("WIN!");

            TP_Camera thirdPerCam = Camera.main.GetComponent <TP_Camera>();
            if (thirdPerCam)
            {
                thirdPerCam.enabled = false;
            }

            GameObject [] bothRats = GameObject.FindGameObjectsWithTag("Player");
            for (int i = 0; i < bothRats.Length; i++)
            {
                bothRats[i].SetActive(false);
            }

            winCam.gameObject.SetActive(true);
        }
    }
 void Awake()
 {
     _instance = this;
 }
示例#20
0
 void Awake()
 {
     Instance = this;
 }
示例#21
0
 void Awake()
 {
     Instance = this;
 }
示例#22
0
 void Start()
 {
     CharacterController = GetComponent("CharacterController") as CharacterController;
     Instance            = this;
     TP_Camera.UseExistingOrCreateNewMainCamera();
 }
示例#23
0
    /*public bool shakeSwitch;
    *  public const float SetshakeValue = 5;
    *  public float shakeValue;*/

    void Awake()
    {
        Instance    = this;
        myTransform = transform;
    }
 void Awake()
 {
     _instance = this;
 }
示例#25
0
 void Start()
 {
     instance = this;
 }