Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(gameObject);
        hotbar_prefab = hotbar_ref;
        sprite_prefab = sprite_ref;
        pickup_prefab = pickup_ref;

        g_manager       = GameObject.Find("Game Manager").GetComponent <game_manager>();
        i_manager       = GameObject.Find("Item Manager").GetComponent <item_manager>();
        e_manager       = GameObject.Find("Enemy Manager").GetComponent <enemy_manager>();
        b_manager       = GameObject.Find("Enemy Manager").GetComponent <boss_manager>();
        p_manager       = GameObject.Find("Player Manager").GetComponent <player_manager>();
        perks           = GameObject.Find("Player Manager").GetComponent <perk_manager>();
        feature_spawner = GameObject.Find("Map Manager").GetComponent <map_feature_spawner>();
        m_gen           = GameObject.Find("Map Manager").GetComponent <map_generator>();
        v_manager       = GameObject.Find("Map Manager").GetComponent <fov_manager>();
        d_manager       = GameObject.Find("Dijkstra Manager").GetComponent <dijkstra_manager>();
        events          = GameObject.Find("Event Manager").GetComponent <event_manager>();

        game_master = new rpg_character();

        colors    = new Color[7];
        colors[0] = Color.green;
        colors[1] = Color.red;
        colors[2] = Color.blue;
        colors[3] = Color.cyan;
        colors[4] = Color.magenta;
        colors[5] = Color.yellow;
        colors[6] = Color.grey;

        up    = new Vector2Int(0, 1);
        down  = new Vector2Int(0, -1);
        left  = new Vector2Int(-1, 0);
        right = new Vector2Int(1, 0);
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        p_manager = GameObject.Find("Player Manager").GetComponent <player_manager>();

        visible     = new Color(0, 0, 0, 0);
        not_visible = new Color(0, 0, 0, 1);
        prev_seen   = new Color(0, 0, 0, .5f);
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(gameObject);
        dungeon_map = GameObject.Find("Map Manager").GetComponent <map_generator>();
        f_manager   = GameObject.Find("Map Manager").GetComponent <fov_manager>();
        p_manager   = GameObject.Find("Player Manager").GetComponent <player_manager>();

        player_distance = new int[util_ref.m_gen.x_dim, util_ref.m_gen.y_dim];
        player_sight    = new int[util_ref.m_gen.x_dim, util_ref.m_gen.y_dim];
        enemy_location  = new int[util_ref.m_gen.x_dim, util_ref.m_gen.y_dim];

        init_gradient();
    }
Exemplo n.º 4
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(this.gameObject);
        }

        DontDestroyOnLoad(this);

        player.SetActive(false);
    }
Exemplo n.º 5
0
 private void Awake()
 {
     instance = this;
 }
Exemplo n.º 6
0
 void Awake()
 {
     instance = this;
 }
Exemplo n.º 7
0
 // Start is called before the first frame update
 void Start()
 {
     rigid = GetComponent <Rigidbody2D>();
     pl    = GameObject.Find("player").GetComponent <player_manager>();
     StartCoroutine("cutscene");
 }
Exemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     pl        = GameObject.Find("player").GetComponent <player_manager>();
     sentences = new Queue <string>();
 }