Beispiel #1
0
    private void Awake()
    {
        // ! gameCtrl.Init is just here while building levels, so we don't need to go through PreGame during testing.
        // Once game is ready to ship, delete it.
        items             = Resources.Load <ItemBaseSet>("ScriptableObjects/SpriteSets/ItemBaseSet");
        enemies           = Resources.Load <EnemySet>("ScriptableObjects/SpriteSets/EnemySet");
        spriteTossableSet = Resources.Load <SpriteTossableSet>("ScriptableObjects/SpriteSets/SpriteTossableSet");

        holdWeight = Resources.Load <ScriptableInt>("ScriptableObjects/weightHeldObj");
        mousePos   = Resources.Load <ScriptableVector2>("ScriptableObjects/v2_mouseWorldPos");

        levelMsg = Resources.Load <StringParamEvent>("ScriptableObjects/Events/WithParam/Str_AnyMsg");

        WaterSurfaceYPos = (waterObj.transform.position.y + (waterObj.GetComponent <Game2DWater>().WaterSize.y * 0.5f));

        gameCtrl.Init();
    }
Beispiel #2
0
 protected override void Awake()
 {
     base.Awake();
     items = Resources.Load <ItemBaseSet>("ScriptableObjects/SpriteSets/ItemBaseSet");
     items.Add(this);
 }