コード例 #1
0
ファイル: ChangeLevel.cs プロジェクト: masterjecht/Doger2
 void Start()
 {
     // mapping varibles
     Player             = GameObject.Find("Player");
     cammanagement      = GameObject.Find("Scripts").GetComponent <CameraManagement>();
     playermasterscript = GameObject.Find("Scripts").GetComponent <PlayerMasterScript>();
     ingametext         = GameObject.Find("Scripts").GetComponent <InGameText>();
     LevelSelectHolder  = GameObject.Find("LevelSelectHolder");
     TimeLines          = GameObject.Find("Scripts").GetComponent <TimeLineManagers>();
     globalscripts      = GameObject.Find("Scripts").GetComponent <GlobalScipts>();
     Door = this.transform.Find("Door").gameObject;
 }
コード例 #2
0
ファイル: Focus.cs プロジェクト: jjhp/EmpiresOfUnity
    // Releases the Lock to the locked Unit after its ordering process is finished, so other Units can get Focus again....
    // must be called by the Unit whitch has Locked the Focus,givin its own gameObject as parameter for UnlockKey, or the Focus wont be Unlocked...
    public bool Unlock(GameObject unlockKey)
    {
        if (IsLocked)
        {
            if (unlockKey.GetInstanceID() == KeyObject.GetInstanceID())
            {
                KeyObject = null;
                InGameText.AddTextLine("FOCUS UNLOCKED !!!");
            }
        }

        return(!IsLocked);
    }
コード例 #3
0
ファイル: LocalizeText.cs プロジェクト: Khas195/CORE
    public void OnTextNameChange(string oldName, string newName)
    {
        var inGameText = InGameText.GetInstance();

        if (inGameText)
        {
            var textData = inGameText.GetTextData(newName);
            if (textData != null)
            {
                id = textData.id;
                EditorUtility.SetDirty(this.gameObject);
            }
        }
    }
コード例 #4
0
ファイル: LocalizeText.cs プロジェクト: Khas195/CORE
    public void OnIdChange(int oldId, int newId)
    {
        var inGameText = InGameText.GetInstance();

        if (inGameText)
        {
            var textData = inGameText.GetTextData(newId);
            if (textData != null)
            {
                textName = textData.name;
                EditorUtility.SetDirty(this.gameObject);
            }
        }
    }
コード例 #5
0
ファイル: Focus.cs プロジェクト: jjhp/EmpiresOfUnity
    // Locks the Focus to This Actual Focussed Unit, till it is has finished recieving orders,so no other Units Will recive MouseData untill
    // the complete ordering process is recognized...   should be called by the Unit right after an option on the RightclickPopUp has been Clicked
    public bool Lock()
    {
        if ((!IsLocked) || (IsLockedToThis))
        {
            KeyObject = this.gameObject;

            InGameText.AddTextLine("FOCUS HAS LOCKED to: " + KeyObject.name + " " + KeyObject.GetInstanceID().ToString());

            return(true);
        }
        else
        {
            return(false);
        }
    }
コード例 #6
0
ファイル: UnitGroup.cs プロジェクト: jjhp/EmpiresOfUnity
    public void GroupedLeftOnGround()
    {
        Vector3 click = MouseEvents.State.Position.AsWorldPointOnMap;

        MemberUnit[0].GetComponent <UnitScript>().Options.FocussedLeftOnGround(click);

        for (int i = 1; i < MemberUnit.Count; i++)
        {
            Vector3 distanceVector;
            //    float distance = Vector3.Distance(MemberUnit[i].transform.position , MemberUnit[0].transform.position);
            distanceVector = MemberUnit[i].transform.position - MemberUnit[0].transform.position;
            InGameText.AddTextLine(distanceVector.ToString());
            //     distanceVector = (distance>15)? distanceVector*0.66f : (distance<15)? distanceVector*2f : distanceVector;
            MemberUnit[i].GetComponent <UnitScript>().Options.FocussedLeftOnGround(click + distanceVector);
        }
        //   MemberUnit[i].GetComponent<UnitOptions>().MoveAsGroup(MemberUnit[0]);

        GroupState = GROUPSTATE.Moving;
    }
コード例 #7
0
ファイル: LocalizeText.cs プロジェクト: Khas195/CORE
    public DropdownList <string> GetTextName()
    {
        var result     = new DropdownList <string>();
        var inGameText = InGameText.GetInstance();

        if (inGameText)
        {
            var textList = inGameText.GetTextList();
            foreach (var text in textList.texts)
            {
                result.Add(text.name, text.name);
            }
        }
        else
        {
            LogHelper.LogWarning("Missing In Game Text instance for Text Localization");
        }
        return(result);
    }
コード例 #8
0
 private void NotEnoughResourcesMessage()
 {
     InGameText.AddTextLine("You need more Resources");
 }
コード例 #9
0
 void WriteTextOnScreen(InGameText where, string msg)
 {
     gameTexts[(int)where].text = msg;
 }
コード例 #10
0
ファイル: LocalizeText.cs プロジェクト: Khas195/CORE
 public void LoadText()
 {
     LogHelper.Log("Loading new Text for " + this);
     this.text.text = InGameText.GetInstance().GetTextData(id).content;
     EditorUtility.SetDirty(this.gameObject);
 }