Inheritance: MonoBehaviour
示例#1
0
 /// <summary>
 /// Awake
 /// </summary>
 void Awake()
 {
     a = GetComponent<Animator>();
     j = GetComponent<PlayerJumping>();
     t = transform;
     pm = GetComponent<PlayerMotor>();
 }
	void Start () {

        swipeVector = SwipeVector.GetTraceVector();
        playerCollider = GetComponent<Collider2D>();
        playerMotor = GetComponent<PlayerMotor>();

     }
示例#3
0
    // Initialize Player, Spawnpoint, etc.
    void Start () {

        //zeigerLayerMask = LayerMask.NameToLayer ( "Zeiger" );
        //nichtZeigerLayerMask = ~zeigerLayerMask;

        gameController = FindObjectOfType<GameController> ();

        gameObject.name = PLAYER_ID_PREFIX + netId.ToString ();

        //CmdRegisterThisPlayer ();

        motor = GetComponent<PlayerMotor> ();
        cam = GetComponentInChildren<Camera> ();

        Pointer = Instantiate ( PointerPrefab );
        
        //TODO: 
        //  try LoadPlayer
        //  if player = null;
        //Erstellt einen Leeren Spieler
        playerData = new PlayerData ();

        Cursor.lockState = CursorLockMode.Confined;

    }
示例#4
0
    void Start()
    {
        motor = GetComponent<PlayerMotor>();
        joint = GetComponent<ConfigurableJoint>();

        SetJointSettings(jointSpring);
    }
 public virtual void Start()
 {
     characterStats = gameObject.GetCharacterStats();
     inventory = gameObject.GetInventory();
     playerMotor = gameObject.GetPlayerMotor();
     characterStats.Died += characterStats_Died;
 }
    void Start() {

        FinishArea = FindObjectOfType<FinishArea>();
        plMotor = FindObjectOfType<PlayerMotor>();

        SpawnPlayer();

    }
示例#7
0
	void Start()
	{
		motor = GetComponent<PlayerMotor> ();
        joint = GetComponent<ConfigurableJoint>();
        AC = GetComponent<AnimationController>();

        setJointSetting(jointSpring); 
	}
    void Start()
    {
        motor = GetComponent<PlayerMotor>();
        //joint = GetComponent<ConfigurableJoint>();

        //SetJointSettings(jointSpring);
        timeLastLeavingFloor = Time.time;
    }
示例#9
0
 /// <summary>
 /// Awake
 /// </summary>
 void Awake()
 {
     a = GetComponent<Animator>();
     r = GetComponent<Rigidbody>();
     c = GetComponent<PlayerClimbing>();
     pm = GetComponent<PlayerMotor>();
     t = transform;        
 }
    void Start()
    {
        motor = GetComponent<PlayerMotor>();

        if (mouseLock)
        {
            Cursor.lockState = CursorLockMode.Locked;
        }
    }
示例#11
0
        protected virtual void Awake()
        {
            motor_ = GetComponent<PlayerMotor>();
            _owner = GetComponent<Player>();

            _eye = GetComponentInChildren<SearchEye>();
            _eye.OnFind = FindPlayer;
            _eye.OnLoseSight = LostPlayer;
        }
    //wasd controls
    
    void Awake()
    {
        _myTransform = transform;
        character = gameObject.GetComponent<CharacterController>();
        motor = gameObject.GetComponent<PlayerMotor>();
        //uiCamera = Camera.main.gameObject.GetComponent<UICamera>();
        //UICamera.fallThrough = this.gameObject;
        //outputAngleVector = new Vector2(0,0);

    }
示例#13
0
 /// <summary>
 /// Start
 /// </summary>
 private void Start()
 {
     //hud = GameObjectTools.GetComponentInChildren<menu_in_game_hud>(FindObjectOfType<menu_in_game>().gameObject);
     //hud = FindObjectOfType<menu_in_game>().gameObject.GetComponentInChildrenB<menu_in_game_hud>();
     //hud = GetComponentsInChildren<menu_in_game_hud>(true)[0];
     //menu_in_game m = FindObjectOfType<menu_in_game>();
     //hud = m.GetComponentsInChildren<menu_in_game_hud>(true)[0];
     pm = GetComponent<PlayerMotor>();
     cam = GetComponent<PlayerCamera>();
     cl = GetComponent<PlayerClimbing>();
     atk = GetComponent<PlayerAttack>();
 }
    // Initialization
    void Start()
    {
        // For safety
        if (!isServer || !isLocalPlayer)
            return;

        motor = GetComponent<PlayerMotor>();
        playerAudio = GetComponent<AudioSource>();

        // Setting up the Vive tracked objects - for getting index of controller
        leftTrackedObject = this.transform.Find("[CameraRig]").Find("Controller (left)").GetComponent<SteamVR_TrackedObject>();
        rightTrackedObject = this.transform.Find("[CameraRig]").Find("Controller (right)").GetComponent<SteamVR_TrackedObject>();
    }
示例#15
0
    // Use this for initialization
    void Start()
    {
        r = gameObject.GetComponent<Rigidbody2D>();
        c = gameObject.GetComponent<BoxCollider2D>();
        motor = GetComponent<PlayerMotor>();
        rend = GetComponent<SpriteRenderer>();
        anim = GetComponent<Animator>();

        actClimb = GetComponent<PlayerActionClimb>();
        actLand = GetComponent<PlayerActionRoll>();
        actVault = GetComponent<PlayerActionVault>();
        actKick = GetComponent<PlayerActionKickOff>();
        actSwing = GetComponent<PlayerActionSwing>();
    }
	void Awake()
	{
		if (photonView.isMine)
		{
			this.enabled = false;   // due to this, Update() is not called on the owner client.
		}
		
		latestCorrectPos = transform.position;
		onUpdatePos = transform.position;

		_transform = transform;
		_motor = GetComponent<PlayerMotor>();
		myStatus = GetComponent<CharacterStatus>();
		actionManager = GetComponent<CharacterActionManager>();
	}
	// Update is called once per frame
	void FixedUpdate () {
		UpdateFloats ();
		BooleanSwitches ();

		if (canMove == true) {
			if (isFollowingTarget == true) {
				if (pm.isStrafing == true) {
					if (distFromTarget > combatRange * 2) {
						FaceTarget ();
						FollowTarget ();
					}
				} else {
					FaceTarget ();
					FollowTarget ();
				}
			} else {
				//BoundWander();
			}
		}

		pm = (PlayerMotor)ec.activeTarget.GetComponent ("PlayerMotor");
	}
 void Start()
 {
     cam     = Camera.main;
     motor   = GetComponent <PlayerMotor>();
     canMove = true;
 }
示例#19
0
 public CollisionPlayerAbility(float coolDownDuration, float channelingDuration, float abilityDuration, PlayerMotor playerMotor,
                               bool channelingCancellable, bool castingCancellable, bool parallelizable, int id) :
     base(coolDownDuration, channelingDuration, abilityDuration, playerMotor, channelingCancellable, castingCancellable, parallelizable, id)
 {
 }
示例#20
0
 void Awake()
 {
     _motor = GetComponent <PlayerMotor>();
 }
示例#21
0
 public PlayerInstance(PlayerMotor __player)
 {
     _player = __player;
     team    = _player.myTeam;
 }
示例#22
0
 private void Start()
 {
     motor = GetComponent <PlayerMotor>();
 }
示例#23
0
 void Start()
 {
     motor       = GetComponent <PlayerMotor>();
     sensitivity = 1.5f;
 }
示例#24
0
 protected override void OnInitialize()
 {
     _player = GetComponent<Player>();
     _motor = GetComponent<PlayerMotor>();
 }
        void Awake()
        {
            playerEnterExit = GetComponent<PlayerEnterExit>();
            if (!playerEnterExit)
                throw new Exception("PlayerEnterExit not found.");

            playerCamera = GetComponentInChildren<Camera>();
            if (!playerCamera)
                throw new Exception("Player Camera not found.");

            playerMouseLook = playerCamera.GetComponent<PlayerMouseLook>();
            if (!playerMouseLook)
                throw new Exception("PlayerMouseLook not found.");

            playerMotor = GetComponent<PlayerMotor>();
            if (!playerMotor)
                throw new Exception("PlayerMotor not found.");

            playerEntityBehaviour = GetComponent<DaggerfallEntityBehaviour>();
            if (!playerEntityBehaviour)
                throw new Exception("PlayerEntityBehaviour not found.");

            SaveLoadManager.RegisterSerializableGameObject(this);
        }
 void Start()
 {
     es = EventSystem.current;
     rb = GetComponent<Rigidbody2D>();
     motor = GetComponent<PlayerMotor>();
     anim = GetComponent<Animator>();
     throwable = GetComponent<Throwable>();
     audioSource = GetComponent<AudioSource>();
     GameObject globalGM = GameObject.FindGameObjectWithTag("globalGM");
     if (globalGM != null) { cameraBackToPositionTime = globalGM.GetComponent<UIManager>().fadeTime; }
     halfBackTime = new WaitForSeconds(cameraBackToPositionTime / 2);
     fullBackTime = new WaitForSeconds(cameraBackToPositionTime);
     blinkTimeWFS = new WaitForSeconds(blinkTime);
     lookUpTimeWFS = new WaitForSeconds(lookUpTime);
     wait = false;
     alive = true;
     canLoad = true;
     canTouch = true;
     StartCoroutine(WaitAtStart());
     time = 0;
 }
示例#27
0
 void Awake()
 {
     motor = GetComponent<PlayerMotor>();
 }
 void Start()
 {
     r = gameObject.GetComponent<Rigidbody2D>();
     c = gameObject.GetComponent<BoxCollider2D>();
     motor = GetComponent<PlayerMotor>();
 }
 void Awake()
 {
     motor = GetComponent<PlayerMotor>();
     state = GetComponent<PlayerState>();
     serverLogic = GameObject.Find("Game").GetComponent<ServerLogic>();
 }
示例#30
0
 // Start is called before the first frame update
 void Start()
 {
     _playerController = GetComponent <PlayerController>();
     _anim             = GetComponent <Animator>();
     _motor            = GetComponent <PlayerMotor>();
 }
示例#31
0
 private void Start()
 {
     cam   = Camera.main;
     motor = GetComponent <PlayerMotor>();
 }
示例#32
0
 public virtual void use(PlayerMotor motor)
 {
 }
示例#33
0
 void Start()
 {
     player = GetComponent <Player>();
     motor  = GetComponent <PlayerMotor>();
 }
示例#34
0
 public virtual void hold(PlayerMotor motor)
 {
 }
示例#35
0
 public MoveLeftCommand(PlayerMotor pm)
 {
     m_pm = pm;
 }
示例#36
0
 public virtual void end(PlayerMotor motor)
 {
 }
示例#37
0
 void Start()
 {
     motor = GetComponent<PlayerMotor>();
 }
示例#38
0
 public void kUpdate(PlayerMotor motor, float timeElapsed)
 {
 }
示例#39
0
 public void SetNewPlayerMotor(PlayerMotor __player)
 {
     _player = __player;
     team    = _player.myTeam;
 }
示例#40
0
    // Use this for initialization
    void Start()
    {
        motor = GetComponent <PlayerMotor>();

        oldXPos = transform.position.x;
    }
 void Awake()
 {
     playerMotor = FindObjectOfType <PlayerMotor>();
 }
示例#42
0
 // Start is called before the first frame update
 void Start()
 {
     cam = Camera.main;
     // Comment
     motor = GetComponent <PlayerMotor>();
 }
示例#43
0
 void Start()
 {
     player = FindObjectOfType <PlayerMotor>();
 }
示例#44
0
 void Awake()
 {
     //Initialize components
     motor = GetComponent<PlayerMotor>();
 }
示例#45
0
 private void Awake()
 {
     movement   = GetComponent <PlayerMotor>();
     playerAnim = GetComponent <PlayerAnimation>();
 }
    PlayerMotor motor;              //Creates a motor variable

    // Use this for initialization
    void Start()
    {
        cam   = Camera.main;                    //Casts the main camera in the scene to our camera variable
        motor = GetComponent <PlayerMotor>();   //Gets all the components inside of PlayerMotor
    }
示例#47
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMotor>();
 }
示例#48
0
 private void Awake()
 {
     _playerMotor   = GetComponent <PlayerMotor>();
     _playerWeapons = GetComponent <PlayerWeapons>();
 }
示例#49
0
 void Start()
 {
     motor = GetComponent<PlayerMotor>();
     GunStats = weapon.GetComponent<GunStats>();
 }
示例#50
0
    /// <summary>
    /// Initialize attack component.
    /// </summary>
    void Awake()
    {
        t = transform;
		pm = GetComponent<PlayerMotor>();
        cam = GetComponent<PlayerCamera>();
        a = GetComponent<Animator>();
	}
示例#51
0
 private void Awake()
 {
     playerMotor = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMotor>();
     animator    = GetComponent <Animator>();
 }
示例#52
0
 void Start()
 {
     motor    = GetComponent <PlayerMotor>();
     myPlayer = GetComponent <PlayerController>();
 }
示例#53
0
 // Start is called before the first frame update
 void Start()
 {
     cam   = UnityEngine.Camera.main;
     motor = GetComponent <PlayerMotor>();
 }
示例#54
0
    Camera cam;                    // Reference to our camera

    // Get references
    void Start()
    {
        motor = GetComponent <PlayerMotor>();
        cam   = Camera.main;
    }
示例#55
0
 private void Start()
 {
     _motor    = GetComponent <PlayerMotor>();
     _animator = GetComponent <CustomNetworkAnimator>();
 }
 private void Awake()
 {
     animator = GetComponent <Animator> ();
     health   = GetComponent <Health> ();
     motor    = GetComponent <PlayerMotor> ();
 }
    void Start () {

        playerMotor = FindObjectOfType<PlayerMotor>();
        imageIndicator = GetComponent<Image>();

	}
示例#58
0
 // Use this for initialization
 void Start()
 {
     shoot = GetComponent <PlayerShoot>();
     motor = GetComponent <PlayerMotor>(); //tell unity to seek the playermotor script attached to this object and call it 'motor'
     equip = GetComponent <Equipment>();
 }
示例#59
0
 // Use this for initialization
 void Start()
 {
     myMotor = GetComponent<PlayerMotor>();
     Cursor.lockState = CursorLockMode.Locked;
     Cursor.visible = false;
 }
示例#60
0
        // private:
        void InitializeComponent()
        {
            _motor = GetComponent<PlayerMotor>();
            _capsule = GetComponent<CapsuleCollider>();
            _kick = GetComponentInChildren<WeaponBase>();

            _motor.CanChangeDirection = IsNormalState;

            AnimatorAccess = GetComponent<PlayerAnimator>();
        }