コード例 #1
0
ファイル: Goal.cs プロジェクト: maishiroma/MixAndJam_2020
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag(playerTag))
     {
         playerController = collision.GetComponent <Player.PlayerController>();
     }
 }
コード例 #2
0
ファイル: Player_Movement.cs プロジェクト: McBuff/DMV
        // Use this for initialization
        void Start()
        {

            m_PositionKeyFrames = new KeyframeList<Vector3>();
            m_PlayerController  = GetComponent<PlayerController>();

        }
コード例 #3
0
ファイル: PlayerController.cs プロジェクト: ChrisJong/Harmony
        void Awake() {
            instance = this;
            characterController = GetComponent<CharacterController>() as CharacterController;

            this.indicationTexture = this.indication.GetComponent<AnimateTextureSheet>() as AnimateTextureSheet;
            this._currentBlock = null;
            this._currentDirection = PlayerInfo.MovementDirection.NONE;            
        }
コード例 #4
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.CompareTag(playerTag))
     {
         canToggleBetween = false;
         playerController = null;
         mainCamera.RevertBack();
     }
 }
コード例 #5
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.CompareTag(playerTag) && canToggleBetween == false)
     {
         canToggleBetween = true;
         playerController = collision.GetComponent <Player.PlayerController>();
         mainCamera.StartTransition(lookCameraAtPos);
     }
 }
コード例 #6
0
    void OnTriggerEnter(Collider collider)
    {
        if (collider.GetComponent <Player.PlayerController>() != null)
        {
            player           = collider.GetComponent <Player.PlayerController>();
            player.PowerUps += this.UpdatePickUp;
            player.ChangeSpeedFactor(SpeedValue);

            OnPickedUp();
        }
    }
コード例 #7
0
 /// <summary>
 /// This function is called on the first frame the object is spawned
 /// it stores references to this objects Transform and PawnAABB classes
 /// grabs the first object in the scene to have a PlayerController script (since only the player should have a PlayerController script)
 /// it then gets the transform of the player object and stores it in a variable for later use
 /// </summary>
 void Start()
 {
     enemy            = gameObject.GetComponent <Transform>();
     enemyBoxCollider = gameObject.GetComponent <BoxCollider>();
     Player.PlayerController playerControl = (Player.PlayerController)FindObjectOfType(typeof(Player.PlayerController));
     player = playerControl.GetComponent <Transform>();
     if (useActivationDistance == false)
     {
         isActivated = true;
     }
 }
コード例 #8
0
 /// <summary>
 /// This method is called by the PlayerController when this state begins.
 /// </summary>
 /// <param name="player">The state-machine driven PlayerController object that called this method.</param>
 public abstract void OnEnter(PlayerController player);
コード例 #9
0
        private void Start()
        {
            movementInput = new Vector2();

            characterController = gameObject.GetComponent <Player.PlayerController>();
        }
コード例 #10
0
 void Start()
 {
     playerController = GetComponent <Player.PlayerController>();
     currentHealth    = startingHealth;
 }
コード例 #11
0
 public PlayerData(Player.PlayerController player)
 {
     Player = player;
     elapsedTimeSinceExit = 0f;
     isExitTimeActive     = false;
 }
コード例 #12
0
ファイル: Raft.cs プロジェクト: laurenrwhite1999/TreeOfLife
 /// <summary>
 /// This method detaches the raft from a PlayerController.
 /// </summary>
 public void Detach()
 {
     pawn  = null;
     pawn2 = null;
 }
コード例 #13
0
ファイル: Raft.cs プロジェクト: laurenrwhite1999/TreeOfLife
 /// <summary>
 /// This method is called to attach the raft to a player.
 /// </summary>
 /// <param name="player">The PlayerController to attach to.</param>
 public void Attach(Player.PlayerController player)
 {
     pawn = player;
     transform.rotation = player.GetComponent <Transform>().rotation;
 }
コード例 #14
0
ファイル: ConditionController.cs プロジェクト: McBuff/DMV
 //c-tor
 public ConditionController(PlayerController playerController)
 {
     m_playerController = playerController;
     m_ConditionsList = new List<Condition>();
 }
コード例 #15
0
 /// <summary>
 /// This method is called by the PlayerController when this state ends.
 /// </summary>
 /// <param name="player">The state-machine driven PlayerController object that called this method.</param>
 public abstract void OnExit(PlayerController player);
コード例 #16
0
ファイル: PlayerManager.cs プロジェクト: McBuff/DMV
        /// <summary>
        /// Assigns a Player object to a photonPlayer
        /// </summary>
        /// <param name="playerObject"></param>
        /// <param name="photonPlayer"></param>
        public void AssignPlayerObjectToPlayer(PlayerController playerObject, PhotonPlayer photonPlayer)
        {
            for (int i = 0; i < m_PlayerInfoList.Count; i++)
            {
                if (m_PlayerInfoList[i].PhotonPlayer == null)
                    continue;

                if (m_PlayerInfoList[i].PhotonPlayer.ID == photonPlayer.ID)
                {
                    PlayerInfo plInfo = m_PlayerInfoList[i];
                    if (plInfo.PlayerObject != null)
                        Debug.Log(PhotonNetwork.player.name + " says: I already have a player object, yet I'm assigning one. Is it the same one?");

                    plInfo.PlayerObject = playerObject;

                    m_PlayerInfoList[i] = plInfo;
                }

            }
        }
コード例 #17
0
ファイル: Player_Orientation.cs プロジェクト: McBuff/DMV
 // Use this for initialization
 void Start()
 {
     m_OrientationKeyframesList = new KeyframeList<double>();
     m_PlayerController = GetComponent<PlayerController>();
 }
コード例 #18
0
 // Use this for initialization
 void Start()
 {
     m_OrientationKeyframesList = new KeyframeList <double>();
     m_PlayerController         = GetComponent <PlayerController>();
 }
コード例 #19
0
ファイル: GrabObjects.cs プロジェクト: caffeinedev/caffeine
        /**
         * Initialization
         */
        void Awake()
        {
            if (!grabBox)
            {
                grabBox								= new GameObject ();
                grabBox.name						= "GrabSensor";
                Collider collider					= grabBox.AddComponent<SphereCollider> ();
                collider.isTrigger					= true;
                grabBox.transform.parent			= transform;
                grabBox.transform.localPosition		= new Vector3 (0f, 0f, 1.5f);
                grabBox.layer						= 2; // Ignore raycasts
                Debug.Log ("Created 'grabBox' for grab sensing");
            }

            playerController	= GetComponent<PlayerController> ();
            actorBody			= GetComponent<ActorBody> ();
            rigidBody			= GetComponent<Rigidbody> ();
            defRotateSpeed		= playerController.rotateSpeed;
        }
コード例 #20
0
 public virtual void SetPlayerControllerInstance()
 {
     currentPlayerController = GameApplication.Instance.GetService <IBulletService>().GetPlayerControllerInstance();
 }
コード例 #21
0
 // Use this for initialization
 void Start()
 {
     _player         = FindObjectOfType <Player.PlayerController>();
     Fill.fillAmount = 0;
 }
コード例 #22
0
 /// <summary>
 /// This method is called by the PlayerController every tick.
 /// </summary>
 /// <param name="player">The state-machine driven PlayerController object that called this method.</param>
 /// <returns>The new state that the PlayerController should switch to. If null, then remain in this state.</returns>
 public virtual PlayerState Update(PlayerController player)
 {
     this.player = player;
     return(null);
 }