当前位置: 首页>>代码示例>>C#>>正文


C# PlayerMovement类代码示例

本文整理汇总了C#中PlayerMovement的典型用法代码示例。如果您正苦于以下问题:C# PlayerMovement类的具体用法?C# PlayerMovement怎么用?C# PlayerMovement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PlayerMovement类属于命名空间,在下文中一共展示了PlayerMovement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Awake

	//public Collider2D meleeTrigger;


	void Awake () {

		rb = GetComponent<Rigidbody2D> ();
		s_movement = GetComponent<PlayerMovement> ();
		directionIndicator.transform.position = new Vector3(directionIndicator.transform.position.x, directionIndicator.transform.position.y + weaponHeightAboveCenter, directionIndicator.transform.position.z);

	}
开发者ID:cooperdombeck,项目名称:Stuff,代码行数:10,代码来源:PlayerAttackRanged.cs

示例2: Awake

	void Awake ()
	{
		onFire = false;
		announcerAudio = GetComponents<AudioSource> () [1];
		playerAttack = GetComponent<PlayerAttack> ();

		canvas = GameObject.Find ("HUDCanvas");
		//Debug.Log ("PlayerHealthUI_" + playerAttack.playerNum);

		inGameHealthUI = canvas.GetComponent<RectTransform> ().Find ("PlayerHealthUI_" + playerAttack.playerNum)
			.GetComponent<InGameHealthUI>();
		inGameHealthUI.playerHealth = this;
		rigid = GetComponent<Rigidbody> ();
		gm = GameObject.Find ("GameManager").GetComponent<GameManager> ();
		uim = GameObject.Find ("GameManager").GetComponent<UI_Manager> ();
		joystickNum = playerAttack.joystickNum;
		damageReduction = 1;
		allgrounds = GameObject.FindGameObjectsWithTag("Island");
		anim = GetComponent <Animation> ();
		playerAudio = GetComponent <AudioSource> ();
		playerMovement = GetComponent <PlayerMovement> ();

		//playerShooting = GetComponentInChildren <PlayerShooting> ();
		currentHealth = startingHealth;
		SetupHealthUI ();
	}
开发者ID:kkiniaes,项目名称:Fire-On-Ice,代码行数:26,代码来源:PlayerHealth.cs

示例3: Awake

	void Awake ()
	{
		// first get the playermovement and playerrotation on THIS script's gameobject
		_playerMovement_ref = GetComponent<PlayerMovement> ();
		_playerRotation_ref = GetComponent<PlayerRotation>();
		// and the player
		m_Player = GetComponent<Player>();

		// then tell the inputcontrollermanager to set its static variables to match
		// THIS script's _iControllerNumber,


        InputControllerManager.KeyMap map = InputControllerManager.WhatControllerAmI(_iControllerNumber);

		// THEN set THIS script's movement and rotation script axis values to match the inputcontroller's values
		// [playermovement]
        _playerMovement_ref._horizontalAxis = map._horizontalAxis;
        _playerMovement_ref._verticalAxis = map._verticalAxis;
		// [playerrotation]
        _playerRotation_ref._horizontalAxis = map._horizontalAxis;
        _playerRotation_ref._verticalAxis = map._verticalAxis;

        m_Player.m_Attack = map._button01;
        m_Player.m_Pause = map._buttonPause;
	}
开发者ID:LuckiiGoggy,项目名称:GGJ16-Totem-Gods,代码行数:25,代码来源:PlayerController.cs

示例4: PlayerHit

	//override = je maakt een extensie van die functie
	public override void PlayerHit(PlayerMovement _GO)
	{
		base.PlayerHit(_GO);//roep de basis classe nog wel aan(dus de playerhit in pickup)
		//voeg hier code toe zo dat de speler zijn score omhoog gaat
		_GO.m_score += 100;
		Destroy (this.gameObject);
	}
开发者ID:jimbo333,项目名称:EndlessRunnerFinish,代码行数:8,代码来源:Mushroom.cs

示例5: Start

    // Use this for initialization
    void Start()
    {
        audioSou = GetComponent<AudioSource> ();

        timer = 0.0f;
        dashTimer = 0.0f;
        weapon = GameObject.Find ("p1/Weapon");
        flashlight = GameObject.Find ("p1/Flashlight");
        body = GetComponent<Rigidbody2D> ();

        playerMov = GameObject.FindGameObjectWithTag ("Player").GetComponent<PlayerMovement> ();

        isHookOn = false;
        comeHere = false;
        goAway = false;
        applyDash = false;
        canDash = true;

        canShoot = true;
        shootTimer = 0.0f;
        countShootTime = false;

        canShootShield = true;
        shieldTimer = 0.0f;
        countShieldTime = false;

        isFlashlightOn = false;

        hookTimer = 0.0f;
        hookConstant = hookFlyingTime;
    }
开发者ID:wlots,项目名称:Klaustrofobia,代码行数:32,代码来源:Player1Skills.cs

示例6: Awake

	void Awake () {

		rb = GetComponent<Rigidbody2D> ();
		meleeTrigger.enabled = false;
		s_movement = GetComponent<PlayerMovement> ();

	}
开发者ID:cooperdombeck,项目名称:Stuff,代码行数:7,代码来源:PlayerAttackMelee.cs

示例7: Awake

    //dan
    //protected PlayerRotation PlayerRot;
    // =============================================================================
    // =============================================================================
    // METHODS UNITY ---------------------------------------------------------------
    protected virtual void Awake()
    {
        Config = GameObject.FindWithTag ( "Config" ).GetComponent<Config> ();

        Trans = transform;
        Audio = audio;
        NetView = networkView;

        GameObject player = GameObject.FindWithTag ( "Player" );
        PlayerMov = player.GetComponent<PlayerMovement> ();

        //dan
        //TODO: fix player Rotation
        //PlayerRot = player.GetComponent<PlayerRotation> ();
        Equip = gameObject.GetComponent<Equipment> ();

        if ( DisplayLeft )
        {
            DisplayLeft.renderer.material.color = DisplayColor;
        }
        if ( DisplayRight )
        {
            DisplayRight.renderer.material.color = DisplayColor;
        }
    }
开发者ID:Jonas90,项目名称:iss,代码行数:30,代码来源:MeterAbstract.cs

示例8: Start

    void Start()
    {
        if(confuseTime < 0.0f)
        {
            Debug.LogError("Please set confuseTime!");
        }

        playerApi = GetComponent<PlayerMovement>();

        if(playerApi == null)
        {
            Debug.LogError("Eitcha lele! Cade o PlayerMovement no player?");
        }

        ResourceManager resourceApi = GameObject.FindGameObjectWithTag("ResourceManager").GetComponent<ResourceManager>();

        confuseEffect = resourceApi.getTextureByName("confuse_gas_effect");

        Debug.Log("Texturaaaa: " + confuseEffect.name);

        alpha = GUI.color.a;

        // Agora nao me pergunte pq o confuseTime ao quadrado =P
        alphaDecrease = ( alpha / (confuseTime * confuseTime ) ) * Time.deltaTime;
        Debug.Log("Decrease: " + alphaDecrease);

        StartCoroutine(doConfusion(confuseTime, playerApi));
    }
开发者ID:creepnck,项目名称:ProjetoFinal,代码行数:28,代码来源:ConfusionGasEffect.cs

示例9: Start

 void Start()
 {
     pMove = GameObject.FindObjectOfType<PlayerMovement>();
     snowSteps = SoundManager.LoadAllFromGroup("Snowsteps");
     woodSteps = SoundManager.LoadAllFromGroup("Woodsteps");
     stoneSteps = SoundManager.LoadAllFromGroup("Stonesteps");
 }
开发者ID:CaptainKirby,项目名称:Surtr,代码行数:7,代码来源:Footsteps.cs

示例10: Start

    // Use this for initialization

    void Start()
    {
        spellAnimation = GetComponent<Animator>() as Animator;
        audioReference = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<GameMaster>();
        playerMove = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerMovement>();
        //castingSpell = false;
    }
开发者ID:kt-chin,项目名称:GGJ2016,代码行数:9,代码来源:ComboSystem.cs

示例11: Update

    void Update()
    {
      

        if (SceneManager.GetActiveScene().buildIndex <= 1) 
        {
           //Debug.Log("WE ARE IN MAIN MENU OR LEVEL SELECTOR");
            //pregame = true;
        }
        else 
        {
            if (GameObject.FindGameObjectWithTag("Player") == null)
            {
                playerDead = true;
            }
            if (playerDead)
            {
                if (playedDeath == false)
                {
                    audioSource.clip = playerSound[5];
                    audioSource.volume = 1.0f;
                    audioSource.Play();
                    playedDeath = true;
                }
             }


            if (GameObject.FindGameObjectWithTag("Player") == null) return;
           playerMove = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerMovement>();
       }
    
    }
开发者ID:kt-chin,项目名称:GGJ2016,代码行数:32,代码来源:GameMaster.cs

示例12: Start

    void Start()
    {
        playerMovement = Camera.main.GetComponent<PlayerMovement>();
        grid = GetComponent<Grid>();

        if (SEED == 0)
        {
            SEED = Random.seed;
            Random.seed = SEED;
        }
        else
        {
            Random.seed = SEED;
        }

        if (text == null)
        {
            //text = GameObject.FindGameObjectWithTag("Text").GetComponent<Text>();
        }
        if (text != null)
        {
            //text.text = "" + SEED;
        }
        
        Debug.Log("LEVEL SEED: " + SEED);

        Generate();
        GenerateEnemies();
    }
开发者ID:darkstrauss,项目名称:Bonkers,代码行数:29,代码来源:GenerateContent.cs

示例13: Start

 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     camCtrl = Camera.main.GetComponent<CameraControl>();
     playMove = player.GetComponent<PlayerMovement>();
     playLife = player.GetComponent<PlayerLife>();
 }
开发者ID:DanStout,项目名称:FablesOfSol,代码行数:7,代码来源:DungeonManager.cs

示例14: Awake

 void Awake()
 {
     player = GameObject.Find("Player(Goliath)").GetComponent<Transform>();
     PlayerAnim = GameObject.Find("Player(Goliath)").GetComponent<PlayerMovement>();
     sound = GameObject.Find("Handeler").GetComponent<SoundManager>();
     
 }
开发者ID:DavidZwit,项目名称:MytheDAG2016,代码行数:7,代码来源:Projectile.cs

示例15: PlayerInteract

 protected override void PlayerInteract(PlayerMovement player)
 {
     if(m_IsDone)
     {
         WinSequenceManager.Instance.StartWinSequence();
     }
 }
开发者ID:KristofferMatis,项目名称:Ludum_Dare_32_Proj1,代码行数:7,代码来源:Boat.cs


注:本文中的PlayerMovement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。