//new constructor
 public DatasetImageElements(DatasetElements datasetElementsObj) :
     base(datasetElementsObj.GetFilename(), datasetElementsObj.GetShortFilename())
 {
     this.charater = DatasetImageElements.Charater.unset;
     //Setting code vector of image
     this.pictureStringFormat = SetPictureStringFormat(datasetElementsObj.GetFilename());
 }
Beispiel #2
0
        public bool IfWon(TMIntelligence receiving)
        {
            var ifReceived = ReceivedIntelligences.TryToReceive(receiving);

            if (Camp.CampCategory == TMCamp.TMCampCategory.Blue)
            {
                return(ifReceived.CountInBlue() == 3);
            }
            if (Camp.CampCategory == TMCamp.TMCampCategory.Red)
            {
                return(ifReceived.CountInRed() == 3);
            }

            return(Charater.IfWon(receiving, ReceivedIntelligences, null, null));
        }
Beispiel #3
0
    //start animation
    IEnumerator MapAnimation(int tilevalue)
    {
        for (int tilenum = 0; tilenum < tilevalue; tilenum++)
        {
            GameObject tileBox = mapPos.transform.GetChild(tilenum).gameObject;

            LeanTween.moveLocalY(tileBox, 0.5f, 0.2f);
            yield return(new WaitForSeconds(0.2f));

            LeanTween.moveLocalY(tileBox, 0, 0.2f);
        }
        userChar = Instantiate(Resources.Load("Prefab/Charater/" + "SimplePeople_Police_White") as GameObject);
        userChar.transform.position = characterSpwaner.transform.position;
        userChatInfo = userChar.GetComponent <Charater>();
        playerPos    = new PlayerInfo(0, 0);
    }
    public void CreateCharater()
    {
        Charater charater = new Charater(charaterId, firstName, lastName, charaterName);

        firstName    = firstNameField.text;
        lastName     = lastNameField.text;
        charaterName = charaterNameField.text;
        charaterId   = auth.CurrentUser.UserId;

        Debug.Log("First Name" + firstName + "Last Name" + lastName);
        Debug.Log("Charater Name" + charaterName);
        Debug.Log("Charater Name" + charaterId);

        _Ref.Child("firstname").SetValueAsync(firstName);
        _Ref.Child("lastname").SetValueAsync(lastName);
        _Ref.Child("charatername").SetValueAsync(charaterName);
    }
Beispiel #5
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if (!collision.GetComponent <Charater>().Die)
         {
             Charater player = collision.gameObject.GetComponent <Charater>();
             if (player.inside)
             {
                 Debug.Log("hello");
                 target = null;
             }
             if (!player.inside)
             {
                 attack             = true;
                 transform.position = new Vector3(target.transform.position.x, target.transform.position.y, target.transform.position.z);
                 StopAllCoroutines();
                 corutin = false;
                 StartCoroutine(player.End());
                 player.cam.gameObject.GetComponent <Animation>().enabled = true;
                 player.Invoke("ge", 1.0f);
                 player.flash.SetActive(false);
                 player.flashstate = false;
                 player.Die        = true;
                 player.gameObject.GetComponent <SpriteRenderer>().enabled = false;
                 AnimationReset();
                 ZomBie_Animator.SetBool("Kill", true);
             }
         }
     }
     if (collision.gameObject == target)
     {
         target = null;
         StartCoroutine(GetZombie_Move_State());
     }
 }
 public void SetCharater(Charater charater)
 {
     this.charater = charater;
 }
Beispiel #7
0
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <Charater>();
 }
Beispiel #8
0
 public Form1()
 {
     InitializeComponent();
     Charater MainCharacter = new Charater();
 }