Beispiel #1
0
        static void Main(string[] args)
        {
            ChangeCharacter c = new ChangeCharacter();

            Console.WriteLine(c.uppercase("hello in accounttest-uppercase"));
            Console.WriteLine(c.uppercase("******************************"));
            Console.WriteLine(c.lowercase("hello in accounttest-lowercase"));
            Console.WriteLine(c.uppercase("******************************"));


            //create an instance of Account
            Accounts objAccount = new Accounts(1000);

            Console.WriteLine("After creating account :");
            objAccount.ShowBalance();

            objAccount.deposit(5000);
            Console.WriteLine("After depositing amount :");
            objAccount.ShowBalance();

            objAccount.withdraw(6000);
            Console.WriteLine("After withdrawing :");
            objAccount.ShowBalance();
            Console.ReadKey();
        }
Beispiel #2
0
 private void Start()
 {
     zombieHp = maxHp;
     cChara   = GameObject.Find("ChangePlayer").GetComponent <ChangeCharacter>();
     hpSlider = GetComponentInChildren <Slider>();
     fillImg  = hpSlider.image;
 }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        anim       = GetComponent <Animator>();
        isMovement = false;
        isRotation = false;

        playersc    = GameObject.FindGameObjectWithTag("Player").GetComponent <Players>();
        soundSource = GameObject.Find("SoundSource");
        cChara      = GameObject.Find("ChangePlayer").GetComponent <ChangeCharacter>();
    }
Beispiel #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello for Testing My Assembly -Change Character");


            ChangeCharacter c1 = new ChangeCharacter();

            string u = c1.UpperCase("hello class library");
            string l = c1.LowerCase("THANKS CLASS LIBRARY");

            Console.WriteLine("Using My Assembly methods");
            Console.WriteLine("Upper Case :" + u);
            Console.WriteLine("Lower Case :" + l);
            Console.ReadKey();
        }
Beispiel #5
0
        public void TestChangeCharacter()
        {
            var firstMobile = new Mobile(0x1);

            firstMobile.DefaultMobileInit();
            firstMobile.Name = "Test Mobile";

            var account = new TestAccount(new[] { firstMobile, null, null });

            var data = new ChangeCharacter(account).Compile();

            Span <byte> expectedData = stackalloc byte[5 + account.Length * 60];
            var         pos          = 0;

            expectedData.Write(ref pos, (byte)0x81);                  // Packet ID
            expectedData.Write(ref pos, (ushort)expectedData.Length); // Length
            expectedData.Write(ref pos, (byte)1);                     // Count of non-null characters
            expectedData.Write(ref pos, (byte)0);

            for (var i = 0; i < account.Length; ++i)
            {
                var m = account[i];
                if (m == null)
                {
#if NO_LOCAL_INIT
                    expectedData.Clear(ref pos, 60);
#else
                    pos += 60;
#endif
                }
                else
                {
                    expectedData.WriteAsciiFixed(ref pos, m.Name, 30);
#if NO_LOCAL_INIT
                    expectedData.Clear(ref pos, 30);  // Password (empty)
#else
                    pos += 30;
#endif
                }
            }

            AssertThat.Equal(data, expectedData);
        }
 void Update()
 {
     //		Debug.Log(characters[0].CharacterName);
     //		Debug.Log(characters[0].CharacterGameObject.tag);
     if(object.ReferenceEquals(changeCharacter,null))
     {
         changeCharacter = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<ChangeCharacter>();
     }
 }
    public void levelControl(string level)
    {
        characters.ForEach(e => e.activatePlayerGameObject(new Vector3(0,0,0)));
        characters.ForEach(e => DontDestroyOnLoad(e.CharacterGameObject));

        Application.LoadLevel(level);
        characters.ForEach( e=>	{
            e.CharacterGameObject.GetComponentInChildren<AttackController>().loadSkills(e.SkillsList);
        });

        changeCharacter = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<ChangeCharacter>();
        characters.ForEach( e => e.HealthController.connectToScript(e));
        characters.ForEach(e => e.CharacterGameObject.transform.position =  new Vector3(44,21,0)); //GameObject.FindGameObjectWithTag("StartLocation").transform.position);

        characters.ForEach(e => { if(characters.IndexOf(e) != 0) e.setGameObjectActive(false); });

        for(int i=0; i<characters.Count; i++)
        {
            if(i !=0)
                characters[i].setGameObjectActive(false);
        }
    }
Beispiel #8
0
 private void Start()
 {
     cChara = GameObject.Find("ChangePlayer").GetComponent <ChangeCharacter>();
     pTest  = GetComponentInChildren <PlayerTest>();
 }
Beispiel #9
0
 //Обработка нажатия выбора игрока
 public void OnChangePlayerPressed()
 {
     ChangeCharacter.Show();
 }