void Awake() { rigid2d = GetComponent <Rigidbody2D>(); Commun = GameObject.Find("Commun"); scrCommunVariables = Commun.GetComponent <CommunVariables>(); scrPlayerData = GetComponent <PlayerData>(); }
void Awake() { scrPlayerData = GetComponent <PlayerData>(); boxColliderPlayer = GetComponent <BoxCollider2D>(); systPart = GetComponent <ParticleSystem>(); rendSpriteRenderer = GetComponent <SpriteRenderer>(); Commun = GameObject.Find("Commun"); scrCommunVariables = Commun.GetComponent <CommunVariables>(); }
void Awake() { Commun = GameObject.Find("Commun"); scrCommunVariables = Commun.GetComponent <CommunVariables>(); Player = GameObject.Find("Player"); scrPlayerData = Player.GetComponent <PlayerData>(); rigPlayer = Player.GetComponent <Rigidbody2D>(); startY = oldY = Player.transform.position.y; }
void Awake() { Commun = GameObject.Find("Commun"); scrCommunVariables = Commun.GetComponent <CommunVariables>(); wallTransform = GetComponent <Transform>(); rigbodyWall = GetComponent <Rigidbody2D>(); checkPositionCount = checkPositionDelay; wallPosition = wallPositionOld = wallTransform.position; }
public void FntLoad() { if (scrCommunVariables == null) { scrCommunVariables = GetComponent <CommunVariables>(); } if (File.Exists(Application.dataPath + "/Saves" + "/Scores.dat")) { BinaryFormatter bf2 = new BinaryFormatter(); FileStream file2 = File.Open(Application.dataPath + "/Saves" + "/Scores.dat", FileMode.Open); GameData dataLoad = (GameData)bf2.Deserialize(file2); file2.Close(); scrCommunVariables.HightScore = dataLoad.HightScore; } else { scrCommunVariables.HightScore = 0; } }
void Awake() { Commun = GameObject.Find("Commun"); scrCommunVariables = Commun.GetComponent <CommunVariables>(); }
void Awake() { scrCommunVariables = GetComponent <CommunVariables>(); FntLoad(); }