This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*==== DebugConsole.cs ==================================================== | |
* Class for handling multi-line, multi-color debugging messages. | |
* Original Author: Jeremy Hollingsworth | |
* Based On: Version 1.2.1 Mar 02, 2006 | |
* | |
* Modified: Simon Waite | |
* Date: 22 Feb 2007 | |
* | |
* Modification to original script to allow pixel-correct line spacing | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mouseOverColor = Color.blue;//声明变量为蓝色 | |
private var originalColor : Color;//声明变量存储本来颜色 | |
function Start () { | |
originalColor = renderer.sharedMaterial.color;//开始时得到物体本来着色 | |
} | |
function OnMouseEnter () { | |
renderer.material.color = mouseOverColor;//当鼠标滑过时改变物体颜色为蓝色 | |
} | |
function OnMouseExit () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case PunEvent.RPC: | |
//ts: each event now contains a single RPC. execute this | |
this.ExecuteRPC(photonEvent[ParameterCode.Data] as Hashtable, originatingPlayer); | |
break; | |
case PunEvent.SendSerialize: | |
case PunEvent.SendSerializeReliable: | |
Hashtable serializeData = (Hashtable)photonEvent[ParameterCode.Data]; | |
//Debug.Log(serializeData.ToStringFull()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class NetworkInterpolatedTransform : Photon.MonoBehaviour | |
{ | |
// | |
// NOTE: Network interpolation is afffected by the network sendRate. | |
// By default this is 10 times/second for OnSerialize. (See PhotonNetwork.sendIntervalOnSerialize) | |
// Raise the sendrate if you want to lower the interpolationBackTime. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (c)2011 MuchDifferent. All Rights Reserved. | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using uLink; | |
/// 检查是否移动过快.并进行纠正. :) | |
/// <summary> | |
/// A script example that can be use for players' objects in a 3d game without gravity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (c)2011 MuchDifferent. All Rights Reserved. | |
using UnityEngine; | |
using uLink; | |
/// <summary> | |
/// A script example that can be use for players' avatars in a game where the server is authoritative or non-authoritative. | |
/// </summary> | |
/// <remarks> | |
/// When using this example script, it should be added as a component to the game object that a player controls. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//client.Photon.SupportClass. | |
public static List<MethodInfo> GetMethods (Type type, Type attribute) | |
{ | |
List<MethodInfo> list = new List<MethodInfo> (); | |
List<MethodInfo> result; | |
if (type == null) | |
{ | |
result = list; | |
} | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PhotonNetwork.isMessageQueueRunning = true; | |
isPaused = true; | |
resolutions = Screen.resolutions; | |
resolutionIndex = (resolutions.Length-1)/2; | |
QualityNames = QualitySettings.names; | |
playerList = true; | |
enableHelper = GameObject.FindWithTag("EnableHelper").gameObject; | |
//Setup team names ******************************** | |
team_1.teamName = "Team A"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class MainMenuVik : MonoBehaviour | |
{ | |
void Awake() | |
{ | |
//PhotonNetwork.logLevel = NetworkLogLevel.Full; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Preloader : Photon.MonoBehaviour | |
{ | |
public GUISkin skin; | |
void Update() | |
{ |