public override void Excute() { Debug.LogFormat("Create Actor: {0}", Params["name"]); //set objname if(Params["objname"] == "") { Params["objname"] = Params["name"]; } //set path string path = Params["path"]; path = Settings.ACTOR_IMAGE_PATH + path; Params["path"] = path; //set position /* Vector3 pos = GetActorPosition(Params["pos"], Params["z_pos"]); Params["x"] = pos.x.ToString(); Params["y"] = pos.y.ToString(); Params["z"] = pos.z.ToString(); */ ImageInfo info = new ImageInfo(Params); //set position info.Position = new Vector3(0, 0, 0); ActorObject ao = ImageManager.Instance.CreateObject<ActorObject, ImageInfo>(info); //base.Excute(); }
public override void Excute() { ImageInfo info = new ImageInfo(Params); //ImageObject io = ImageManager.Instance.CreateImage(info); //ImageObject io = ImageManager.Instance.CreateObject<ImageObject, ImageInfo>(info); ImageObject io = ImageManager.Instance.CreateObject<ImageObject, ImageInfo>(info); // Instances.Instance.ImageManager.CreateImage() base.Excute(); }
public override void Init(ObjectInfo info) { base.Init(info); _info = (ImageInfo)info; Go = new GameObject(info.ObjName); _image = Go.AddComponent<Image>(); //create image Sprite i = Resources.Load<Sprite>(_info.Path + _info.Name); if (i == null) { Debug.LogFormat("Cannot load image file:{0}", _info.Path + _info.Name); } }