Ejemplo n.º 1
0
    public PersoShooter(GameObject o, PersoFillerShooter pfs, Camera c)
    {
        cam       = c;
        G         = o;
        transform = o.transform;
        rb        = o.GetComponent <Rigidbody>();
        anim      = o.GetComponent <Animator>();

        FillFromFiller(pfs);
        FillDico();
        InitiateImpulsion();
        InitiateStates();
    }
Ejemplo n.º 2
0
    public void FillFromFiller(PersoFillerShooter p)
    {
        states   = p.AnimationStates;
        c_states = p.CharacterState;

        Speed         = p.Speed;
        RotationSpeed = p.RotationSpeed;
        JumpForce     = p.JumpForce;
        MaxVelocity   = p.MaxVelocity;
        DashForce     = p.DashForce;
        DashTime      = p.DashTime;

        UseStep         = p.UseStep;
        AngleBeforeStep = p.AngleBeforeStep;
        StepSpeed       = p.StepSpeed;
        AngleTarget     = p.AngleTarget;
        MinAngleStep    = p.MinAngleStep;

        AdditionalGravity = p.AdditionalGravity;
        DragFly           = p.DragFly;
        DragGround        = p.DragGround;

        LandingSpeed         = p.LandingSpeed;
        MinSpeedLandingRatio = p.MinSpeedLandingRatio;

        UseSuperFly           = p.UseSuperFly;
        StraightSpeed         = p.StraightSpeed;
        SuperFlyRotationSpeed = p.SuperFlyRotationSpeed;
        VerticalRatio         = p.VerticalRatio;

        UseSpecialEffects = p.UseSpecialEffects;
        if (UseSpecialEffects)
        {
            FXHolder          = p.FXHolder;
            MaxEffectIterator = FXHolder.Count;
        }


        height = G.GetComponent <Collider>().bounds.size.y / 2;
    }