Ejemplo n.º 1
0
 void Initialization()
 {
     // SetTrail();
     trail         = GetComponent <TrailRenderer>();
     trail.enabled = false;
     holder        = transform.root.gameObject.GetComponent <BaseFight>();
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     if (!is_IA)
     {
         inputs = GetComponent <BaseInputs>();
     }
     fight = GetComponent <BaseFight>();
     move  = GetComponent <BaseMove>();
     // axe_control = GetComponent<GoWAxeControl>();
 }
Ejemplo n.º 3
0
    void Initialization()
    {
        cam            = Camera.main;
        rb             = GetComponent <Rigidbody>();
        anim           = GetComponent <Animator>();
        fight          = GetComponent <BaseFight>();
        TargetRotation = transform.rotation;

        height = GetComponent <Collider>().bounds.size.y / 2f;
        foreach (TrailRenderer tr in DashTrails)
        {
            tr.enabled = false;
        }
    }
Ejemplo n.º 4
0
        public BaseFight EndFight(Fighter victor, Fighter loser)
        {
            var fightResult = new BaseFight()
            {
                Room       = Plugin.Channel,
                WinnerId   = victor.Name,
                LoserId    = loser.Name,
                FinishDate = DateTime.UtcNow
            };

            using (var context = Plugin.Context)
            {
                context.Add(fightResult);
                context.SaveChanges();
            }


            Plugin.ResetFight();

            return(fightResult);
        }