Exemplo n.º 1
0
        void Awake()
        {
            switch (controllerType)
            {
            case ControllerType.Keyboard:
                m_controller = gameObject.AddComponent <PlayerKeyboardController> ();
                break;

            case ControllerType.Controller:
                m_controller = gameObject.AddComponent <PlayerGamepadController> ();
                break;
            }

            m_Movement = GetComponent <MovementHandler> ();
        }
    public override void OnReplicationPrepare()
    {
        PlayerController     localActiveControllerAnimClipReplacer = this.GetLocalActiveControllerAnimClipReplacer();
        PlayerControllerType playerControllerType = localActiveControllerAnimClipReplacer ? localActiveControllerAnimClipReplacer.m_ControllerType : PlayerControllerType.Unknown;

        if (playerControllerType != this.m_ReplControllerType)
        {
            this.m_ReplControllerType = playerControllerType;
            this.ReplSetDirty();
        }
        if (localActiveControllerAnimClipReplacer)
        {
            string text = localActiveControllerAnimClipReplacer.ReplaceClipsGetItemName();
            if (text != this.m_ReplItemName)
            {
                this.m_ReplItemName = text;
                this.ReplSetDirty();
            }
        }
    }
Exemplo n.º 3
0
 public PlayerControllerAction(PlayerControllerType _ControllerType, string _FunctionName, object _Argument)
 {
     ControllerType = _ControllerType;
     FunctionName   = _FunctionName;
     Argument       = _Argument;
 }