protected virtual void OnPickup(CustomOnlinePlayer player) { player.GetComponent<TutorialLevelUser>().GainEXP(EXP_Reward); player.GetComponent<PlayerFX>().PlaySound(PlayerFX.PLAYER_SOUNDS.PICKUP,false); }
public void SetTargetPlayer(CustomOnlinePlayer p) { _target = p; }
void WinAction(CustomOnlinePlayer winner) { string name = winner.ColoredName; foreach (CustomOnlinePlayer p in onlineRef.allOnlinePlayers) { p.GetComponent<ShipScript>().SetFreeze(true); p.GetComponent<PlayerCaptionController>().RpcPushGameEndDialog(name); } StartCoroutine (StopServer ()); //PlayerCaptionController.BroadcastCaption (winner.ColoredName + " has finished their timer with the cure and wins the game!",5f); }
protected void setPlayerTarget(CustomOnlinePlayer newTarget) { target = newTarget.transform.position; targetPlayer = newTarget; }
protected virtual void OnPickup(CustomOnlinePlayer player, string part) { player.GetComponent<LevelUser>().GainEXP(EXP_Reward, (int)repairPotential, part); }
protected override void OnPickup(CustomOnlinePlayer player) { base.OnPickup(player); player.MapPieces++; player.GetComponent<PlayerFX> ().RpcPlaySoundForMainPlayer (PlayerFX.PLAYER_SOUNDS.PICKUP_SCROLL,false); }
void Start() { onlineRef = GameObject.Find("OnlineSceneReferences").GetComponent<OnlineSceneReferences>(); shipAttributes = GetComponent<ShipAttributesOnline>(); objRigidBody = GetComponent<Rigidbody>(); //Store initial position and rotation Vector3 initialPosition = transform.position; Quaternion initialRotation = transform.rotation; //Reset object's position and rotation transform.position = Vector3.zero; transform.rotation = Quaternion.identity; objBounds = GetComponent<Collider>().bounds; //Set initial position and rotation back transform.position = initialPosition; transform.rotation = initialRotation; onlineInput = GetComponent<OnlinePlayerInput>(); customOnlinePlayer = GetComponent<CustomOnlinePlayer>(); playerRespawn = GetComponent<PlayerRespawn>(); rightCannons = rightSide.GetComponent<CannonGroup>(); leftCannons = leftSide.GetComponent<CannonGroup>(); rightLR = rightSide.GetComponent<LineRenderer>(); leftLR = leftSide.GetComponent<LineRenderer>(); SetupCamera(); SetupControls(); ResetShootAndMovement(); }