Exemplo n.º 1
0
 public void Initialize()
 {
     GameManager.RobotParameter rp = GameManager.Instance.RobotParameters[(Robots)PlayerBody.WhichRobot];
     shoot_speed = rp.Shoot_Speed;
     damage      = rp.AmmoDamage;
     ShootCD     = rp.Shoot_CD;
 }
Exemplo n.º 2
0
 public void Initialize()
 {
     GameManager.RobotParameter rp = GameManager.Instance.RobotParameters[(Robots)PlayerBody.WhichRobot];
     Rotate_Speed            = rp.Rotate_Speed;
     max_speed               = rp.Max_Speed;
     Rigidbody2D.mass        = rp.RobotMass;
     Rigidbody2D.drag        = rp.RobotDrag;
     Rigidbody2D.angularDrag = rp.RobotRotateDrag;
 }
Exemplo n.º 3
0
 public void Initialize(Players _player, Robots whichRobot)
 {
     player = (int)_player;
     GameManager.RobotParameter rp = GameManager.Instance.RobotParameters[whichRobot];
     damage                = rp.AmmoDamage;
     Rigidbody2D.mass      = rp.AmmoMass;
     Rigidbody2D.drag      = rp.AmmoDrag;
     transform.localScale *= rp.AmmoScale;
     Image.sprite          = Sprites[Random.Range(0, 3)];
 }
Exemplo n.º 4
0
 private void LateUpdate()
 {
     if (GameBoardManager.Instance.M_StateMachine.GetState() == GameBoardManager.StateMachine.States.Hide)
     {
         return;
     }
     UI_P.transform.position       = transform.position + Vector3.up * (100 + transform.sizeDelta.x / 2);
     UI_P.transform.rotation       = Quaternion.Euler(Vector3.zero);
     EmojiImage.transform.position = transform.position + Vector3.up * (transform.sizeDelta.x / 2) * 1.5f + Vector3.right * (transform.sizeDelta.x / 2) * 1.5f;
     GameManager.RobotParameter rp = GameManager.Instance.RobotParameters[WhichRobot];
     EmojiImage.transform.rotation   = Quaternion.Euler(Vector3.zero);
     EmojiImage.transform.localScale = Vector3.one * rp.EmojiScale;
 }
Exemplo n.º 5
0
    public void Initialize()
    {
        GameManager.RobotParameter rp = GameManager.Instance.RobotParameters[WhichRobot];

        ammo_need          = rp.AmmoDamage;
        transform.position = defaultPos;
        Do_num             = rp.Do_num;
        if (Do_num > 100)
        {
            Do_num = 100;
        }
        do_time               = 0;
        Move_Speed            = rp.Move_Speed;
        ContactX              = rp.ContactX;
        ContactDamage         = rp.ContactDamage;
        wake                  = rp.wake;
        PlayerImage.sprite    = sps[(int)WhichRobot];
        MaxEnerg              = rp.MaxEnergy;
        SolarChargeSpeed      = rp.SolarChargeSpeed;
        Trash                 = rp.StartTrash;
        Power                 = rp.PowerConsume;
        relife_speed          = rp.Relife_speed;
        Energy                = rp.StartEnergy;
        transform.sizeDelta   = default_self_sizeDelta * rp.RobotScale;
        arrow.sizeDelta       = default_arrow_sizeDelta * rp.RobotScale;
        circleCollider.radius = transform.sizeDelta.x / 2;
        LootedArea.radius     = (transform.sizeDelta.x / 2);
        DoArea.radius         = (transform.sizeDelta.x / 2) * 1.5f;
        UpdateHp();
        UpdateTrash();
        Charging           = false;
        EmojiImage.enabled = false;
        move.Initialize();
        shoot.Initialize();
        ShootParticleSystem.transform.localPosition = Vector3.up * (transform.sizeDelta.x);
        ShootParticleSystem.transform.localScale    = default_ShootFxScale * rp.RobotScale;
        NoPowerParticleSystem.transform.localScale  = default_NoPowerScale * rp.RobotScale;
        CrownImage.enabled = false;
    }