Esempio n. 1
0
 protected virtual void OnPickup(CustomOnlinePlayer player)
 {
     player.GetComponent<TutorialLevelUser>().GainEXP(EXP_Reward);
     player.GetComponent<PlayerFX>().PlaySound(PlayerFX.PLAYER_SOUNDS.PICKUP,false);
 }
Esempio n. 2
0
 public void SetTargetPlayer(CustomOnlinePlayer p)
 {
     _target = p;
 }
Esempio n. 3
0
    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);
    }
Esempio n. 4
0
 protected void setPlayerTarget(CustomOnlinePlayer newTarget)
 {
     target = newTarget.transform.position;
     targetPlayer = newTarget;
 }
Esempio n. 5
0
 protected virtual void OnPickup(CustomOnlinePlayer player, string part)
 {
     player.GetComponent<LevelUser>().GainEXP(EXP_Reward, (int)repairPotential, part);
 }
Esempio n. 6
0
 protected override void OnPickup(CustomOnlinePlayer player)
 {
     base.OnPickup(player);
     player.MapPieces++;
     player.GetComponent<PlayerFX> ().RpcPlaySoundForMainPlayer (PlayerFX.PLAYER_SOUNDS.PICKUP_SCROLL,false);
 }
Esempio n. 7
0
    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();
    }