void Awake() { if (instance == null) { instance = this; } }
// Start is called before the first frame update void Start() { _startScore = Score; _player = GameObject.FindWithTag("PlayerBody").GetComponent <BangsPhysics.RigidBody>(); _audio = GetComponentInChildren <Audio>(); _audio.Forwards(true); Transform startTransform = GetComponent <Transform>(); Restart.onStateDown += Restart_onStateDown; TracePath.onStateDown += TracePath_onStateDown; TracePath.onStateUp += TracePath_onStateUp; _frames = new Stack <FrameInfo>(); _hud = HUD.GetComponent <HUD>(); ScoreManager = new scoremanager(); UpdateHighscores(); Attractors = FindObjectsOfType <Attractor>(); LineRenderer = gameObject.AddComponent <LineRenderer>(); LineRenderer.material = new Material(Shader.Find("Sprites/Default")); LineRenderer.widthMultiplier = 0.04f; LineRenderer.positionCount = TotalSimulatePoints; }
void MakeInstance() { if (instance == null) { instance = this; } }
void Awake() { if (scoremanager.instance == null) { scoremanager.instance = this; } A.text = "Total Score =" + BodySourceView.avg.ToString(); }
static async Task MainAsync() { var ScoreManager = new scoremanager(); TableResult result = await ScoreManager.InsertScore(new highscore { PartitionKey = "highscore", //set to highscore partition only if in top 10 RowKey = Guid.NewGuid().ToString(), Score = Convert.ToInt32(99), Timestamp = DateTimeOffset.UtcNow, UserName = "******" }); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); gameObject.name = "$scoremanager"; }
public bool Execute() { bool retValue = false; scoremanager Manager = new scoremanager(); Manager.Start(); while (Manager.score < 20) { Manager.Update(); } Console.WriteLine(Manager.distance); Console.ReadKey(); return(retValue); }
void Awake() { myBody = GetComponent <Rigidbody2D> (); gm = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <scoremanager>(); gameObject.GetComponent <SpriteRenderer>().sprite = mayBayDaChon[mayBayId]; }
void Awake () { myBody = GetComponent<Rigidbody2D> (); gm = GameObject.FindGameObjectWithTag ("ScoreManager").GetComponent<scoremanager> (); }
void Start() { theScoremanager = FindObjectOfType <scoremanager>(); }
void Awake() { scoremanager.instance = this; //싱글톤 부여 }
// Use this for initialization void Start() { scoreskrg = new scoremanager(); a = scoreskrg.ScoreCount; }