Beispiel #1
0
    public SwordThrowProjectile SpawnThrownSword(bool addToTree = true, Node overrideParent = null)
    {
        Node parent = SelectParent(addToTree, overrideParent);
        SwordThrowProjectile result = ZqfGodotUtils.CreateInstance <SwordThrowProjectile>(Path_ThrownSword, parent);

        return(result);
    }
Beispiel #2
0
    public T Spawn <T>(string path)
    {
        T obj = ZqfGodotUtils.CreateInstance <T>(path);

        _root.AddChild(obj as Node);
        return(obj);
    }
Beispiel #3
0
    public GFXQuick SpawnGFX(string path, bool addToTree = true, Node overrideParent = null)
    {
        if (string.IsNullOrEmpty(path))
        {
            path = Path_PointProjectile;
        }
        Node parent = SelectParent(addToTree, overrideParent);

        return(ZqfGodotUtils.CreateInstance <GFXQuick>(path, parent));
    }
Beispiel #4
0
    public EntMob SpawnMob(string mobTypeName = "")
    {
        MobDef mobType = GetMobType(mobTypeName);
        // Pass a null parent as we need to init the mob before adding it to the tree
        // which will invoke _ready
        EntMob mob = ZqfGodotUtils.CreateInstance <EntMob>(mobType.prefabPath, null);

        mob.SetMobType(mobType);
        _root.AddChild(mob);
        return(mob);
    }
Beispiel #5
0
    public PointProjectile SpawnPointProjectile(bool addToTree = true, Node overrideParent = null)
    {
        Node parent = SelectParent(addToTree, overrideParent);

        return(ZqfGodotUtils.CreateInstance <PointProjectile>(Path_PointProjectile, parent));
    }
Beispiel #6
0
    public EntPlayer SpawnPlayer()
    {
        EntPlayer plyr = ZqfGodotUtils.CreateInstance <EntPlayer>(Path_EntPlayer, _root);

        return(plyr);
    }