Esempio n. 1
0
    void Awake()
    {
        rigid2d = GetComponent <Rigidbody2D>();

        Commun             = GameObject.Find("Commun");
        scrCommunVariables = Commun.GetComponent <CommunVariables>();

        scrPlayerData = GetComponent <PlayerData>();
    }
Esempio n. 2
0
    void Awake()
    {
        scrPlayerData      = GetComponent <PlayerData>();
        boxColliderPlayer  = GetComponent <BoxCollider2D>();
        systPart           = GetComponent <ParticleSystem>();
        rendSpriteRenderer = GetComponent <SpriteRenderer>();

        Commun             = GameObject.Find("Commun");
        scrCommunVariables = Commun.GetComponent <CommunVariables>();
    }
Esempio n. 3
0
    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;
    }
Esempio n. 4
0
    void Awake()
    {
        Commun             = GameObject.Find("Commun");
        scrCommunVariables = Commun.GetComponent <CommunVariables>();

        wallTransform = GetComponent <Transform>();
        rigbodyWall   = GetComponent <Rigidbody2D>();

        checkPositionCount = checkPositionDelay;

        wallPosition = wallPositionOld = wallTransform.position;
    }
Esempio n. 5
0
    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;
        }
    }
Esempio n. 6
0
 void Awake()
 {
     Commun             = GameObject.Find("Commun");
     scrCommunVariables = Commun.GetComponent <CommunVariables>();
 }
Esempio n. 7
0
 void Awake()
 {
     scrCommunVariables = GetComponent <CommunVariables>();
     FntLoad();
 }