本文整理汇总了C#中PlayerManager类的典型用法代码示例。如果您正苦于以下问题:C# PlayerManager类的具体用法?C# PlayerManager怎么用?C# PlayerManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayerManager类属于命名空间,在下文中一共展示了PlayerManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Awake
// called when object instantiated
void Awake() {
layerMask = ~(1 << LayerMask.NameToLayer("Player"));
camera = Camera.main.transform;
aim = GetComponent<PlayerAimBehaviour>();
manager = GetComponent<PlayerManager>();
}
开发者ID:jwinder86,项目名称:ArenaShooter,代码行数:8,代码来源:CameraAimBehaviour.cs
示例2: setUniverse
// Called in Bridge.cs
public void setUniverse(int num)
{
Debug.Log("Universe Sent " + num);
universeNum = num;
// Get the origin of the set Universe
Vector3 origin = GameObject.Find("Universe" + num + "/Managers/OriginManager").GetComponent<Universe>().origin;
Debug.Log(num + "Universe " + origin);
// Set camPos to bgPos + 1000 to z
Vector3 camPos = new Vector3(origin.x, origin.y, origin.z + 0.1f);
Debug.Log("camera positons " + camPos);
Camera = (Transform)Instantiate(camPrefab, camPos, new Quaternion(0, 0, 0, 0));
Camera.name = "Camera " + num;
// It is the first time this function has been called
if (characterNum == 99)
{
characterNum = universeNum;
Log.Note("Activate initial");
playerMovement = GameObject.Find("Character" + num).GetComponent<PlayerMovement>();
playerMovement.activateCharacter(num, num);
playerManager = GameObject.Find("Character" + num).GetComponent<PlayerManager>();
playerManager.activateCharacter(num);
FiringHandler fireHandler = GameObject.Find("Character" + num).GetComponent<FiringHandler>();
fireHandler.activateCharacter(num);
}
playerManager.universeNumber = num;
}
开发者ID:jamiehenson,项目名称:STR,代码行数:31,代码来源:OnlineClient.cs
示例3: Start
void Start()
{
if (!player)
{
player = GameObject.Find("Player").GetComponent<PlayerManager>();
}
}
开发者ID:kenfehling,项目名称:World-of-Carbon,代码行数:7,代码来源:WorldProperties.cs
示例4: Start
// Use this for initialization
void Start()
{
playerManager = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
activeController = playerManager.GetActivePlayer().GetComponent<PlayerController>();
controllerName = activeController.GetControllerName();
}
开发者ID:ninacpark,项目名称:EtherealRobot,代码行数:8,代码来源:DebugGuiManager.cs
示例5: Awake
// Use this for initialization
void Awake()
{
Debug.Assert(SaveGameEventSubscription == null && AutoSaveGameEventSubscription == null);
SaveGameEventSubscription= MessageHub.Subscribe<SaveGameEvent>(SaveGame);
AutoSaveGameEventSubscription = MessageHub.Subscribe<AutoSaveGameEvent>(AutoSaveGame);
mapData = new CollectedMapData();
space = GameObject.Find("Space").GetComponent<Space>();
if (space == null)
{
throw new MissingComponentException("Unable to find Space. The big bang doesn't have enough space to happen. The 'Space' game object also needs to be added to the level and have the space script attached.");
}
airTrafficControl = GameObject.Find("AirTrafficControl").GetComponent<AirTrafficControl>();
if (space == null)
{
throw new MissingComponentException("Unable to find AirTrafficControl. There can't be any troops flying around without an global AirTrafficControl GameObject that has an AirTrafficControl Script attached.");
}
gameState = GameObject.Find("2D_MainCam").GetComponent<GameState>();
if (gameState == null)
{
throw new MissingComponentException("Unable to find GameState. The 'GameState' script needs to be attached to the same Gameobject as the BigBang.");
}
playerManager = GameObject.Find("PlayerManagement").GetComponent<PlayerManager>();
if (playerManager == null)
{
throw new MissingComponentException("Unable to find playerManager.");
}
}
开发者ID:simonides,项目名称:space_concept,代码行数:32,代码来源:GameSaver.cs
示例6: Awake
void Awake()
{
canvas = GetComponent<Canvas> ();
listView = GetComponentInChildren<ListView> ();
roomTimeManager = GameObject.FindGameObjectWithTag ("RoomTimeManager").GetComponent<RoomTimeManager> ();
playerManager = GameObject.FindGameObjectWithTag ("PlayerManager").GetComponent<PlayerManager> ();
}
开发者ID:Avatarchik,项目名称:survival-shooter-multiplayer-unity3d-files,代码行数:7,代码来源:ScoreboardCanvas.cs
示例7: TakeDamage
public void TakeDamage(int amount, PlayerManager from) {
if (!isServer || !m_IsAlive)
return;
if (m_CurrentShield > 0) {
m_CurrentShield -= amount;
amount = (m_CurrentShield > 0) ? 0 : Mathf.Abs (m_CurrentShield);
}
m_CurrentHealth -= amount;
if(m_CurrentHealth <= 0){
from.GetKills++;
GameManager.s_Instance.RpcUpdateStatus ();
m_CurrentHealth = m_BaseHealth;
RpcSetPlayerctive (false);
switch (GameManager.m_MatchMode) {
case 0:
StartCoroutine(SetRespawn());
break;
case 1:
break;
}
RpcExplode ();
}
}
开发者ID:xenouk,项目名称:Arena,代码行数:26,代码来源:PlayerHealth.cs
示例8: Awake
// Use this for initialization
void Awake () {
Player = GameObject.Find ("Player");
PlayerInventory = Player.transform.FindChild ("Inventory").GetComponent<Inventory> ();
CharacterContener = Player.transform.FindChild ("Equipement").gameObject;
PlayerHealth = Player.GetComponent<PlayerManager> ();
}
开发者ID:Alvee92,项目名称:Unity-RPG-3D,代码行数:8,代码来源:Consumable.cs
示例9: Initialize
/// <summary>
/// Gets all necessary references.
/// </summary>
public void Initialize()
{
photonView = this.GetComponent<PhotonView>();
myPlayer = this.GetComponent<PlayerManager>();
isMine = photonView.isMine;
}
开发者ID:dearzhangle,项目名称:UNION-OpenSource-MOBA,代码行数:10,代码来源:PlayerNetworkLayer.cs
示例10: IndicatorManager
public IndicatorManager(PlayerManager playerManager, ContentManager content)
{
foreach (Player player in playerManager.Players)
{
nameDrawers.AddFirst(new NameDrawer(player, content));
Texture2D barTexture = content.Load<Texture2D>("Scene/Game/stockbar1p");
Texture2D stockTexture = content.Load<Texture2D>("Scene/Game/stock1p");
if (stockDrawers.Count == 0)
{
barTexture = content.Load<Texture2D>("Scene/Game/stockbar1p");
stockTexture = content.Load<Texture2D>("Scene/Game/stock1p");
}
if (stockDrawers.Count == 1)
{
barTexture = content.Load<Texture2D>("Scene/Game/stockbar2p");
stockTexture = content.Load<Texture2D>("Scene/Game/stock2p");
}
if (stockDrawers.Count == 2)
{
barTexture = content.Load<Texture2D>("Scene/Game/stockbar3p");
stockTexture = content.Load<Texture2D>("Scene/Game/stock3p");
}
if (stockDrawers.Count == 3)
{
barTexture = content.Load<Texture2D>("Scene/Game/stockbar4p");
stockTexture = content.Load<Texture2D>("Scene/Game/stock4p");
}
stockDrawers.AddFirst(new StockDrawer(player, stockDrawers.Count, barTexture, stockTexture));
}
timer = new Timer(content);
}
开发者ID:hirama-akihiro,项目名称:DropFight,代码行数:32,代码来源:IndicatorManager.cs
示例11: Start
// Use this for initialization
void Start()
{
cm = GameObject.Find ("Configuration").GetComponent <ConfigManager>();// GetComponent<ConfigManager> ();
pm = GameObject.Find("Player").GetComponent<PlayerManager>();
pufferSlider.maxValue = (float)Double.Parse(cm.Load ("MaxPufferCharge"));;
breathSlider.maxValue = (float)Double.Parse(cm.Load ("MaxBreath"));
}
开发者ID:NUGameDev,项目名称:LungLunge,代码行数:8,代码来源:HUDUpdater.cs
示例12: Start
public Animator anim; // The animator component from the player.
public void Start()
{
playerManager = GetComponent<PlayerManager>();
playerController = GetComponent<PlayerController>();
playerAttack = GetComponent<PlayerAttack>();
anim = GetComponent<Animator>();
}
开发者ID:DaProject,项目名称:Prototype,代码行数:9,代码来源:PlayerAnimation.cs
示例13: Start
void Start()
{
manager = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
shooter = gameObject.GetComponent<myShooter>();
shooter.SetShooitngInfo(shooting_way, shooting_amount, shooting_repeat, shooting_period, shooting_delay, shooting_angle);
SetBullet();
}
开发者ID:firerings,项目名称:ski-proto-01,代码行数:7,代码来源:Player.cs
示例14: Awake
private float m_timer; //(秒)
#endregion Fields
#region Methods
//初期化===================================================================
void Awake()
{
base.m_doNotPause = true;
//PlayerManager取得----------------------------------------------------
m_PlyMgr = GameObject.FindObjectOfType<PlayerManager>();
}
开发者ID:InagakiTatuya,项目名称:NKC_GlideRace,代码行数:14,代码来源:GameSceneManager.cs
示例15: PlayerManager
public PlayerManager()
{
//DontDestroyOnLoad(this);
singleton = this;
playerDict = new Dictionary<int, Player>();
connectionDict = new Dictionary<int, NetworkConnection>();
}
开发者ID:Geor23,项目名称:Planets,代码行数:7,代码来源:PlayerManager.cs
示例16: Start
void Start()
{
m_bmgr = BattleManager.Get();
m_pmgr = PlayerManager.Get();
GameObject obj = GameObject.Find("MapCam");
m_camera = obj.GetComponent<Camera>();
}
开发者ID:kreeds,项目名称:TestProjectDemo,代码行数:7,代码来源:BBStart.cs
示例17: RoundScoreManager
public RoundScoreManager(Dictionary<int, Player> pd)
{
pirateScore = 0;
superCorpScore = 0;
pm = PlayerManager.singleton;
playerDict = pd; //Reference to other dictionary, means changes here change there too
}
开发者ID:Geor23,项目名称:Planets,代码行数:7,代码来源:RoundScoreManager.cs
示例18: Start
// Use this for initialization
void Start()
{
_players = PlayerManager.getManager();
GameManager game = GameManager.getManager();
transform.parent = game.transform;
game.AssignNetworkManager(this);
}
开发者ID:AndreiMarks,项目名称:where-are-you,代码行数:8,代码来源:NetworkMessageManager.cs
示例19: OnEnable
void OnEnable()
{
my = gameObject.GetComponent <Transform>();
playerManager = GameObject.FindGameObjectWithTag("Manager").GetComponentInChildren<PlayerManager>();
arrowPath = "Weapon/Arrow/Arrow" + playerManager.a.ToString();
starPath = "Weapon/Star/Star" + playerManager.a.ToString();
arrowBullet = my.FindChild("Arrow");
starBullet = my.FindChild("Star");
arrowBullet.GetComponent<SpriteRenderer>().sprite =
Resources.Load<Sprite>(arrowPath);
starBullet.GetComponent<SpriteRenderer>().sprite =
Resources.Load<Sprite>(starPath);
starBullet.gameObject.SetActive(false);
arrowBullet.gameObject.SetActive(false);
if (playerManager.wState == WeaponState.arrow)
{
arrowBullet.gameObject.SetActive(true);
}
else if (playerManager.wState == WeaponState.star)
{
starBullet.gameObject.SetActive(true);
}
}
开发者ID:ChunggiLee,项目名称:TapRPG,代码行数:28,代码来源:BulletMove.cs
示例20: Start
void Start()
{
audio_source = GetComponent<AudioSource> ();
if (new_level) {
SelectMusic ();
new_level = false;
}
levelManager = GameObject.Find ("LevelLogic").GetComponent<LevelManager> ();
enemyManager = GameObject.Find ("LevelLogic").GetComponent<EnemyManager> ();
playerManager = GameObject.Find ("LevelLogic").GetComponent<PlayerManager> ();
//Form level
levelManager.InitLevelMap ();
//Update Each Tile in map - includeds asigning values through CA
levelManager.UpdateGapsAndPlatforms ();
levelManager.UpdateLevelMap ();
//Draw level
levelMap = levelManager.GetLevelMap ();
levelManager.DrawLevelMap ();
//Get level map tile array
//levelMap = levelManager.GetLevelMap ();
enemyManager.LoadMap (levelMap);
playerManager.LoadMap (levelMap);
//Player must be loaded after level for raycasting to work
playerManager.LoadPlayerSpawn ();
playerManager.LoadEndPoint ();
enemyManager.LoadEnemySpawns ();
}
开发者ID:mduffyg13,项目名称:Honours-Project,代码行数:34,代码来源:LevelLogic.cs
注:本文中的PlayerManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论