public void CF_Action_AttachKeyToActor(PMGActor actor, PMGValueStack localStack) { //disables/removes other events and adds parrents this actor under the other, or follows it constantly //add key to players "inventory" if (localStack.GetActor().HasKey == false) { localStack.GetActor().HasKey = true; //Debug.Log("got the key"); /*GameObject Anchor = GameObject.Find("ActorAnchor"); //if() GameObject talk = Instantiate(Resources.Load("Prefabs/TalkBlock"), SingleMapManager.Instance.GameMap[actor.position[0], actor.position[1]].transform.position + new Vector3(2f, 2f, -1), Quaternion.identity) as GameObject; talk.transform.eulerAngles = SingleMenuManager.Instance.LeRotation(); talk.GetComponent<Renderer>().material.mainTexture = (Texture2D)Resources.Load("Textures/GettingKey") as Texture2D; talk.transform.parent = Anchor.transform; talk.name = "Here have the key";//*/ } //turn display off maybe //SingleInstanceManager.Instance.unityActors }
public bool CF_CheckStats_ActorHasMaxKeys(PMGActor actor, PMGValueStack localStack) { if (localStack.GetActor().HasKey) { return(true); } return(false); }
public void CF_GameWin(PMGActor actor, PMGValueStack localStack) { //Debug.Log("you won lolololol"); if (localStack.GetActor().HasKey == false) { //Debug.Log("got the key"); /*GameObject Anchor = GameObject.Find("ActorAnchor"); //if() GameObject talk = Instantiate(Resources.Load("Prefabs/TalkBlock"), SingleMapManager.Instance.GameMap[actor.position[0], actor.position[1]].transform.position + new Vector3(2f, 2f, -1), Quaternion.identity) as GameObject; talk.transform.eulerAngles = SingleMenuManager.Instance.LeRotation(); talk.GetComponent<Renderer>().material.mainTexture = (Texture2D)Resources.Load("Textures/GoGetKey") as Texture2D; talk.transform.parent = Anchor.transform; talk.name = "Go get the key";//*/ } else { //Debug.Log("you won lolololol"); //hack job stuff /*SingleMenuManager.Instance.DeSelectAllM(); SingleMenuManager.Instance.DestroyAll(); SingleMenuManager.Instance.SelectMenu(8); SingleMenuManager.Instance.SelectFirstOrActiveButton(); //SingleInputManager.Instance.inMenu = true; SingleMenuManager.Instance.InstantiateCurrent(); //diplay the selected button in unity and throwing default color on the rest SingleMenuManager.Instance.DisplayUnitySelected(); SingleInputManager.Instance.inMenu = true;*/ //Console.Write("YOU WIN LOLOLOL"); //System.Threading.Thread.Sleep(10000); } }