本文整理汇总了C#中PlayerScript类的典型用法代码示例。如果您正苦于以下问题:C# PlayerScript类的具体用法?C# PlayerScript怎么用?C# PlayerScript使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlayerScript类属于命名空间,在下文中一共展示了PlayerScript类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
showScoreAdded = false;
score = 0f;
_playerScript = GameObject.Find("Player").GetComponent<PlayerScript>();
scorePerSecond = 1f;
}
示例2: Start
// Use this for initialization
void Start()
{
this.koopaShellScript = this.transform.parent.GetComponent<KoopaShellScript> ();
this.player = GameObject.FindWithTag ("Player");
this.playerScript = this.player.GetComponent<PlayerScript>();
this.playerRb = this.player.GetComponent<Rigidbody2D>();
}
示例3: Awake
void Awake()
{
if (spawnVectors.Length > 0)
{
for (int i = 0; i < spawnVectors.Length; i++)
{
if (spawnVectors[i].GetComponent<SpawnVectorScript>() == null)
{
Debug.Log("SpawnVector GameObject No." + i + " does not have the required script Attached.");
errorHasOccured = true;
break;
}
}
if (!errorHasOccured)
{
for (int i = 0; i < spawnVectors.Length - 1; i++)
{
spawnVectors[i].Direction(spawnVectors[i + 1].transform.position);
}
}
else
Debug.Log("Fix the error before continuing playing the game.");
}
player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerScript>();
playerEmo = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PlayerEmotions>();
spawn = spawnVectors[0].transform.position;
}
示例4: Purchase
public void Purchase()
{
if (PortShopManager.Instance.DockedShip.Gold < Cost) return;
PortShopManager.Instance.DockedShip.Gold -= Cost;
Owner = PlayerScript.MyPlayer;
}
示例5: Start
// Use this for initialization
void Start()
{
GameObject playerGO = GameObject.FindWithTag ("Player");
if (playerGO != null) {
player = playerGO.GetComponent<PlayerScript>();
}
}
示例6: AdquireJogadores
public void AdquireJogadores()
{
/*
players= GameObject.FindGameObjectsWithTag ("jogador");
foreach (GameObject atual in players) {
atual.GetComponent<PlayerScript> ().posicao_atual = 2;
scriptsplayers.Add (atual.GetComponent<PlayerScript> ());
}
num_players = scriptsplayers.Count;
player_atual = players [0];
*/
GameObject[] temp = GameObject.FindGameObjectsWithTag ("jogador");
players = new GameObject[temp.Length];
foreach (GameObject atual in temp) {
players [atual.GetComponent<PlayerScript> ().ordem] = atual;
atual.GetComponent<PlayerScript> ().posicao_atual = 1;
// scriptsplayers.Add (atual.GetComponent<PlayerScript> ());
}
//num_players = scriptsplayers.Count;
player_atual = players [0];
addFlagPLayerAtual ();
Atualizar_Texto ();
script_atual = player_atual.GetComponent<PlayerScript> ();
num_players = players.Length;
}
示例7: Start
void Start()
{
parent = GameObject.Find("Charger").GetComponent<Collider>();
player = GameObject.Find("Player").GetComponent<PlayerScript>();
myCollider = gameObject.GetComponent<Collider>();
}
示例8: Start
// Use this for initialization
void Start()
{
camera.orthographicSize = CurrentZoom;
GameObject test;
test = GameObject.Find ("PlayerObject");
playerscript = test.GetComponent<PlayerScript>();
}
示例9: Start
void Start()
{
//ph = GameObject.Find ("PlanetHandler").GetComponent<PlanetHandler> ();
//ph.SetOxygenLevel (100);
ps = GameObject.FindWithTag ("Player").GetComponent<PlayerScript> ();
ps.onAirArea = true;
}
示例10: Awake
void Awake()
{
VariableResourcesScript vrs = GetComponent<VariableResourcesScript>();
players = GameObject.FindGameObjectsWithTag("Player");
objPlayer1 = vrs.objPlayer1;
scrPlayerScript1 = objPlayer1.GetComponent<PlayerScript>();
scrPlayerExperience1 = objPlayer1.GetComponent<PlayerStats>();
scrPlayerHealthScript1 = objPlayer1.GetComponent<PlayerHealthScript>();
scrPlayerShoot1 = objPlayer1.GetComponent<PlayerShoot>();
//objPlayer2 = vrs.objPlayer2;
playersTag = objPlayer1.tag;
// 8: Enemy, 15: Spawn Point, 20: Flying, 24: Neutral, 25: Immune
intEnemyLayerMask = 1 << LayerMask.NameToLayer("Enemy") | 1 << LayerMask.NameToLayer("Flying") | 1 << LayerMask.NameToLayer("Neutral") | 1 << LayerMask.NameToLayer("Immune") | 1 << LayerMask.NameToLayer("Spawn Point");
intHostileLayerMask = 1 << LayerMask.NameToLayer("Enemy") | 1 << LayerMask.NameToLayer("Spawn Point") | 1 << LayerMask.NameToLayer("Immune");
intPlayerUnitsLayerMask = 1 << LayerMask.NameToLayer("Player");
objBullet = vrs.objBullet;
objExplodingShot = vrs.objExplodingShot;
objArrow = vrs.objArrow;
objFire = vrs.objFire;
objExplosion = vrs.objExplosion;
objTemp = vrs.objTemp;
objText = vrs.objText;
texAttribute = vrs.texAttribute;
matLineOfSightSolid = vrs.matLineOfSight;
matLineOfSightTransparent = vrs.matLineOfSightTransparent;
matSkull = vrs.matSkull;
}
示例11: Awake
private PlayerScript m_Player; //Référence au script playerScript
#endregion Fields
#region Methods
// Use this for initialization
void Awake()
{
//Initialise les références
m_Player = GameObject.Find("Character").GetComponent<PlayerScript>();
m_AtTopCheck = transform.Find("Top");
m_AtBotCheck = transform.Find("Bot");
}
示例12: Start
void Start() {
player = GameObject.FindWithTag( "Player" ).GetComponent<PlayerScript>();
opNumSet = GetComponent<OperatorNumberSetScript>();
opNumSet.operatorSide = operatorSide;
StartCoroutine( UpdateNumberRenderer() );
StartCoroutine( Move() );
}
示例13: RemoveMe
protected override void RemoveMe(PlayerScript ps)
{
if(ps!=null){
GUIManager.FloatingTexture(meleeEffect,((ps.transform.position+transform.position)*.5f),.3f,4,1,0,0,4,12);
}
Destroy(gameObject);
}
示例14: Start
// Use this for initialization
void Start()
{
_PlayerSt = GameObject.FindWithTag("player").GetComponent<PlayerScript>();
_PlayerSt._attackChkCol = gameObject.GetComponent<BoxCollider>();
gameObject.GetComponent<BoxCollider>().enabled = false;
}
示例15: Start
// Use this for initialization
void Start()
{
Player = (GameObject) GameObject.FindWithTag ("Player");
playerScript = (PlayerScript) Player.gameObject.GetComponent(typeof(PlayerScript));
gameTime = 0;
portalScript = (PortalScript) GameObject.Find("Portal").GetComponent(typeof(PortalScript));
}