Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Sign in to follow this  
higorgamer

[Photon] New Functions FPS

Recommended Posts

Hello I'm here republishing some new features to Photon

Please login or register to see this code.

Exemple Update Ping

Please login or register to see this code.

Exemple Functions

Please login or register to see this code.

Exemple Damage + Fire Team deathmatch

Please login or register to see this code.
using UnityEngine;
using System.Collections;
public class DanoJogador : Photon.MonoBehaviour {
 

public float vida = 100f; public Texture TexturaDano; private float transparencia = 0f; private float Tempo = 0.0f; [RPC] public void AplicarDano(float dano, PhotonPlayer matador, string Arma) { if(photonView.IsMine) { foreach( PhotonPlayer player in PhotonNetwork.playerList) { if(player.name == matador.name) { if(matador.GetTeam() != PhotonNetwork.player.GetTeam()) { Tempo = 2.0f; vida -= dano; if(vida <= 0.0f) { PhotonNetwork.Destroy(gameObject); matador.AddKill(1); PhotonNetwork.player.AddDeath(1); } } } } } } public void Update() { if (Tempo > 0)Tempo -= Time.deltaTime; transparencia = Tempo; } public void OnGUI() { GUI.color = new Color(1.0f, 1.0f, 1.0f, transparencia); GUI.DrawTexture(new Rect(0,0,Screen.width, Screen.height), TexturaDano); }
}

Exemple  Fire

Please login or register to see this link.

Please login or register to see this code.
  • Like 3

Share this post


Link to post
Share on other sites

I do not know what I am supposed to do ???

Share this post


Link to post
Share on other sites

create a file PunNewFunction.cs any folder

 

and own post I put an example of life script and shot and how you should call the functions

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...