Character.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
    void Start()
    {
        GetComponent<CharacterMovement>().enabled = false;
        GetComponent<CharacterRotation>().enabled = false;
        if (IsLocalPlayer)
        {
            //Make the camera start following this character
            Camera.main.GetComponent<CameraDispatcher>().SetCurrentCharacterTarget(cameraPointer);
            //GetComponent<CharacterMovement>().enabled = true;
            //GetComponent<CharacterRotation>().enabled = true;
        }

        if (isServer)
        {
            GetComponent<CharacterMovement>().enabled = true;
            GetComponent<CharacterRotation>().enabled = true;
        }
    }

Usage Example

示例#1
0
    // Use this for initialization
    void Start()
    {
        //the init status of the enmeny
        mDir  = _CurDir;
        mPose = CurPose;

        if (Parent != null)
        {
            Parent.Start();
        }
    }
All Usage Examples Of Character::Start
Character