protected WorldObject actor; //Object that uses (is capable of) this action //private Texture2D cursorTex = null; //public Texture2D cursor { get { return ResourceManager.loadTexture(ref cursorTex, HoverCursor); } } public Action(string def, WorldObject act) { if (act) { actor = act; } else { Debug.LogError("Action with no parent object!"); } if (def.Length > 0) { this.def = DefStorage.getDef(def) as ActionDef; } else { this.def = DefStorage.getDef(getDefName()) as ActionDef; } if (this.def == null) { this.def = new ActionDef(); } //this.def = ResourceManager. menuImage = new LazyResource <Texture2D>(this.def.MenuIcon); //Init def //InitDef(); }
protected virtual void Start() { if (!storInitiated) { DefStorage.init(gameObject); storInitiated = true; } }
public Def(string name) { //text2D = new Dictionary<string,Texture2D>(); DefStorage.registerDef(this); }