void Start() { animations = (Animations)GameObject.FindObjectOfType(typeof(Animations)); gui = (Gui)GameObject.FindObjectOfType(typeof(Gui)); inventory = (Inventory)GameObject.FindObjectOfType(typeof(Inventory)); instancer = (Instancer)GameObject.FindObjectOfType(typeof(Instancer)); anim = GetComponent<Animator>(); anim.Play("statueIdle"); }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
public override void OnInspectorGUI() { DrawDefaultInspector(); Instancer instance = (Instancer)target; if (GUILayout.Button("Instantiate")) { instance.Instantiate(); } EditorUtility.SetDirty(target); }
private static IAdapterProvider GetConfiguredProviderInstance(LocalRecordsSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } IAdapterProvider provider = Instancer.GetInstanceOfInterface <IAdapterProvider>(settings.ProviderAssemblyLocation, settings.ProviderClass); provider.Init(settings.ProviderParameter); return(provider); }
public List <IDedimaniaPluginPlugin> GetPlugins(IUILogger logger) { List <IDedimaniaPluginPlugin> result = new List <IDedimaniaPluginPlugin>(); foreach (PluginConfigEntry pluginConfigEntry in Plugins.GetEnabledPlugins()) { if (logger != null) { logger.Debug(string.Format("Instantiating IDedimaniaPluginPlugin {0}", pluginConfigEntry.PluginClass)); } result.Add(Instancer.GetInstanceOfInterface <IDedimaniaPluginPlugin>(pluginConfigEntry.AssemblyName, pluginConfigEntry.PluginClass, pluginConfigEntry.PluginDirectory)); } return(result); }
public static List <ITMSPSPlugin> GetPlugins(string mainDirectory, ILogger logger) { string pluginDirectory = Path.Combine(mainDirectory, "Plugins"); List <ITMSPSPlugin> result = new List <ITMSPSPlugin>(); PluginConfigEntryCollection pluginConfigEntries = PluginConfigEntryCollection.ReadFromDirectory(pluginDirectory, logger).GetEnabledPlugins(); foreach (PluginConfigEntry pluginConfigEntry in pluginConfigEntries) { logger.Debug(string.Format("Instantiating ITMSPSPlugin {0}", pluginConfigEntry.PluginClass)); result.Add(Instancer.GetInstanceOfInterface <ITMSPSPlugin>(pluginConfigEntry.AssemblyName, pluginConfigEntry.PluginClass, pluginConfigEntry.PluginDirectory)); } return(result); }
public Instance(Instancer instancer, float scale, Vector3 translate, Vector3 information) { ID++; id = ID; this.Scale(scale); this.Translate(translate); this.Update(); Instancer = instancer; modelMatrix.M13 = scale; modelMatrix.M24 = scale; modelMatrix.M12 = information.X; modelMatrix.M23 = information.Y; modelMatrix.M34 = information.Z; Instancer.instanceTransformMatrices.Add(this, ModelMatrix); }
public InteractiveObject Create(Vector3 position) { GameObject newObject; InteractiveObject obj = new InteractiveObject { health = this.health, mana = this.mana }; newObject = Instancer.Spawn(prefab); obj.transform = newObject.transform; obj.rigidbody = newObject.GetComponent <Rigidbody>(); obj.transform.position = position; obj.targetPosition = position; obj.targetPosition = new Vector3(0f, 0f, 100f); obj.type = this; objects.Add(obj); obj.id = idIterator++; return(obj); }
public RainManager() { Instancer = new Instancer(); }