public void InitializePlayer() { _playerInput = new PlayerInput(); _playerRayCaster = new PlayerRayCaster(Camera.main, transform); _playerSummoner = GetComponent <PlayerSummoner>(); _playerPointer = GetComponent <PlayerPointer>(); _playerPointer.Initialize(); }
/// <summary>Lobbyで決めた色設定はここで引き継げる</summary> public override bool OnLobbyServerSceneLoadedForPlayer(GameObject lobbyPlayerObj, GameObject gamePlayer) { if (_lobbyHooks) { _lobbyHooks.OnLobbyServerSceneLoadedForPlayer(this, lobbyPlayerObj, gamePlayer); } PlayerPointer pPointer = gamePlayer.GetComponent <PlayerPointer>(); LobbyPlayer lPlayer = lobbyPlayerObj.GetComponent <LobbyPlayer>(); pPointer.playerColor = lPlayer.playerColor; return(true); }
/** * Sets the player being effected by the orb's effects * @param p Reference to the player that has this orb */ public void SetPlayer(PlayerPointer p) { LevelManager.instance.RemoveOrb(this); // Remove the orb from the board // Set the references pointer = p; timer = gameObject.GetComponentInChildren <Canvas>().GetComponentInChildren <Image>(); StartOrb(); // Start the timer timeRemaining = TIMER_STEP * EXPIRATION_TIME_SEC; timer.fillAmount = 1; InvokeRepeating("UpdateOrb", 1f / TIMER_STEP, 1f / TIMER_STEP); }
public static void CachePlayerData(int ClientID, PlayerData PlayerData, ObjectIdentity ID) { Players[ClientID] = new PlayerPointer(PlayerData, ID); }
private int speed; // How fast the player can move /** * Setup the player's sprite and its speed */ void Start() { pointer = gameObject.transform.parent.Find("PlayerPointer").GetComponent <PlayerPointer>(); rb2d = GetComponent <Rigidbody2D>(); speed = 2; }
private unsafe int GetCPoseActorState() { var ptr = (byte*)PlayerPointer.ToPointer(); return *(ptr + Offsets.Character.CPose); }
private unsafe byte GetSeatingState() { var ptr = (byte*)PlayerPointer.ToPointer(); return *(ptr + Offsets.Character.SeatingState); }