示例#1
0
    protected void Start()
    {
        ragdollController = GetComponent <RagdollBase>();

        HealthPoints       = maxHealth;
        healthBar.maxValue = maxHealth;
        healthBar.value    = HealthPoints;
    }
示例#2
0
        public override void Init(World w, RagdollManager r)
        {
            world  = w;
            target = r.ragdoll;
            body.setWorld(w);


            IsOperational = true;


            state = State.Scanning;
        }
    void Start()
    {
        playerEyes = Camera.main.transform;
        health     = maxHealth;

        animator    = GetComponent <Animator>();
        ragdollBase = GetComponent <RagdollBase>();

        StartCoroutine(LateStart(0.5f));

        if (isSpawner)
        {
            StartCoroutine(Spawner());
        }
    }
示例#4
0
        public Rocket(Vector2 farseerLoc, World w, RagdollBase r)
        {
            ragdoll = r;
            world   = w;
            Alive   = true;

            DebugMaterial gray = new DebugMaterial(MaterialType.Blank)
            {
                Color = Color.DarkGray
            };

            body  = new Body(w);
            pivot = FixtureFactory.AttachEllipse(.8f, .2f, 8, 1, body, gray);

            body.Position      = farseerLoc;
            body.BodyType      = BodyType.Dynamic;
            body.IgnoreGravity = true;

            Vector2 toRagdoll = r.Body.Position - farseerLoc;

            body.Rotation = (float)Math.Atan2(toRagdoll.Y, toRagdoll.X);

            body.OnCollision += new OnCollisionEventHandler(body_OnCollision);
        }