Example #1
0
    // Use this for initialization
    void Start()
    {
        character = GameObject.Find("MyCharacter");

        mypath = GetComponent <MyPath>();
        myanim = GetComponent <Animator>();
        myUserPostionControll = character.GetComponent <MyUserPostionControll>();
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     CureList            = new ArrayList();
     userPostionControll = GetComponent <MyUserPostionControll>();
     TurnZeroPoint       = new Vector3();
     if (myText != null)
     {
         mytext = myText.GetComponent <Text>();
     }
 }
Example #3
0
    // Use this for initialization
    private void Start()
    {
        myUserPostionControll = GetComponent <MyUserPostionControll>();

        // get the transform of the main camera
        if (Camera.main != null)
        {
            cam = Camera.main.transform;
        }
        else
        {
            Debug.LogWarning(
                "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.");
            // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them!
        }

        // get the third person character ( this should never be null due to require component )
        character = GetComponent <ThirdPersonCharacter>();
    }