Example #1
0
 // Use this for initialization
 void Start()
 {
     charState = this.GetComponent <TestChar>();
     PCon      = this.GetComponent <PlayerController>();
     NT        = this.GetComponent <NotThroughFighter>();
     CEventEne = PCon.fightEnemy.GetComponent <ColliderEvent>();
 }
Example #2
0
        public static System.String RemoveIllegalChars(System.String Str)
        {
            if (Str == null)
            {
                Str = "Unknown";
            }
            Str = Str.Replace('\\', '-');
            Str = Str.Replace('/', '-');
            System.String[] AllowedCharsArray         = new System.String[] { "q", "w", "e", "r", "t", "a", "s", "d", "f", "g", "z", "x", "c", "v", "b", "y", "u", "i", "o", "p", "h", "j", "k", "l", "n", "m", "1", "2", "3", "4", "5", "6", "7", "8", "9", "_", " ", "(", ")", "-" };
            System.Collections.ArrayList AllowedChars = new System.Collections.ArrayList(AllowedCharsArray);
            System.String OutStr = "";

            foreach (System.Char TestChar in Str.ToCharArray())
            {
                if (AllowedChars.Contains(TestChar.ToString().ToLower()))
                {
                    OutStr += TestChar.ToString();
                }
            }

            if (OutStr == "")
            {
                OutStr = "Unknown";
            }

            return(OutStr);
        }
Example #3
0
        public void Pack_AChar_InAClass()
        {
            var myChar = new TestChar {MyChar = 'a'};
            var res = _packer.Pack<TestChar>(myChar);

            Assert.AreEqual(new byte[] { 129 // map size 1
                , 166 // raw size 6
                , 77, 121, 67, 104, 97, 114, // the string "MyChar"
                97 // int 0-127
            }, res);
        }
Example #4
0
    /// <summary>
    ///
    /// version 2.0 add game object
    /// </summary>
    void Start()
    {
        readMeshObjs();
        setDefaultSkin();
        target.GetComponent <Animation>().Play("walk");


        instance_ = this;

        for (int i = 0; i < btnNames_.Length; i++)
        {
            string name = btnNames_[i];
            GameObject.Find(name).GetComponent <Button>().onClick.AddListener(actions_[i]);
        }
    }
Example #5
0
    // Use this for initialization
    void Start()
    {
        animator = GetComponent <Animator>();

        //入力履歴の設定
        history.Clear();
        for (int i = 0; i < commandCount; i++)
        {
            history.Add("N");
        }

        inputHistory.Clear();
        for (int i = 0; i < numInputHistory; i++)
        {
            inputHistory.Add("");
        }

        inputDKey    = 5;
        inputDKeyOld = inputDKey;

        //if (controller > 0) controllerName = Input.GetJoystickNames()[controller - 1];

        //Debug.Log(Input.GetJoystickNames()[0]);
        //Debug.Log(Input.GetJoystickNames()[1]);



        if (isModel)
        {
            CEvent = this.GetComponent <ColliderEvent>();
            TChar  = this.GetComponent <TestChar>();
            audio  = GetComponent <AudioSource>();
            parent = this.transform.parent.gameObject;
            //battleDirector = this.GetComponent<BattleDirector>();
        }
    }
Example #6
0
 // Use this for initialization
 void Start()
 {
     TChar = this.GetComponentInChildren <TestChar>();
     comm  = this.GetComponent <CommandScript>();
 }