Exemple #1
0
 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;
     }
 }
Exemple #4
0
    void Awake()
    {
        if (scoremanager.instance == null)
        {
            scoremanager.instance = this;
        }

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

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