Example #1
0
    void Awake()
    {
        rigid2d = GetComponent <Rigidbody2D>();

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

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

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

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

        checkPositionCount = checkPositionDelay;

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