Esempio n. 1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 2
0
    // 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;
    }
Esempio n. 3
0
 void MakeInstance()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 4
0
    void Awake()
    {
        if (scoremanager.instance == null)
        {
            scoremanager.instance = this;
        }

        A.text = "Total Score =" + BodySourceView.avg.ToString();
    }
Esempio n. 5
0
 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     = "******"
     });
 }
Esempio n. 6
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
     gameObject.name = "$scoremanager";
 }
Esempio n. 7
0
    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);
    }
Esempio n. 8
0
 void Awake()
 {
     myBody = GetComponent <Rigidbody2D> ();
     gm     = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <scoremanager>();
     gameObject.GetComponent <SpriteRenderer>().sprite = mayBayDaChon[mayBayId];
 }
Esempio n. 9
0
	void Awake () 
	{
		myBody = GetComponent<Rigidbody2D> ();

		gm = GameObject.FindGameObjectWithTag ("ScoreManager").GetComponent<scoremanager> ();
	}
Esempio n. 10
0
 void Start()
 {
     theScoremanager = FindObjectOfType <scoremanager>();
 }
Esempio n. 11
0
 void Awake()
 {
     scoremanager.instance = this; //싱글톤 부여
 }
Esempio n. 12
0
 // Use this for initialization
 void Start()
 {
     scoreskrg = new scoremanager();
     a         = scoreskrg.ScoreCount;
 }