Exemplo n.º 1
0
        public GameObject GetGameObjectVarValue(string name)
        {
            plyVar plyVar = this.variables.FindVariable(name);

            if (plyVar == null)
            {
                return(null);
            }
            plyVar_Component plyVar_Component = plyVar.ValueHandler as plyVar_Component;

            if (plyVar_Component != null)
            {
                return(plyVar_Component.GetGameObject());
            }
            return((GameObject)plyVar.GetValue());
        }
Exemplo n.º 2
0
        public T GetComponentVarValue <T>(string name) where T : Component
        {
            plyVar plyVar = this.variables.FindVariable(name);

            if (plyVar == null)
            {
                return(null);
            }
            plyVar_Component plyVar_Component = plyVar.ValueHandler as plyVar_Component;

            if (plyVar_Component != null)
            {
                return(plyVar_Component.GetComponent <T>());
            }
            plyVar_GameObject plyVar_GameObject = plyVar.ValueHandler as plyVar_GameObject;

            if (plyVar_GameObject != null)
            {
                return(plyVar_GameObject.GetComponent <T>());
            }
            return((T)plyVar.GetValue());
        }