// Use this for initialization void Start() { isActive = true; isReplace = false; isWait = false; thisCollider = this.GetComponent <Collider2D> (); btnArray = this.GetComponentsInChildren <Button> (); objectsController = GameObject.Find("ObjectsController").GetComponent <ObjectsController> (); parentPanelFrames = GameObject.Find("PanelFrames").GetComponent <PanelFramesScript> (); }
public void BtnRemove_Click() { if (objectsController.isAllObjectWaitRequest == false) { PanelFramesScript panelFrames = parentPanelFrames.GetComponent <PanelFramesScript> (); // フレームが2つ以上ある場合,自フレームを削除する if (panelFrames.FrameCount > 1) { panelFrames.isFramePlayingDestroyAnimation = true; this.GetComponent <Animator> ().SetBool("isDestroy", true); } // 1フレームのみの場合,そのフレームを初期化する else { objectsController.motionData.FrameInitialize(0); parentPanelFrames.ChildFrameImgClick(0); } } }
// Use this for initialization void Start() { isActive = true; isReplace = false; isWait = false; thisCollider = this.GetComponent<Collider2D> (); btnArray = this.GetComponentsInChildren<Button> (); objectsController = GameObject.Find ("ObjectsController").GetComponent<ObjectsController> (); parentPanelFrames = GameObject.Find ("PanelFrames").GetComponent<PanelFramesScript> (); }