コード例 #1
0
ファイル: Wander.cs プロジェクト: frms/game-jams
    void Start()
    {
        //DebugDraw debugDraw = gameObject.GetComponent<DebugDraw> ();
        //debugRing = debugDraw.createRing (Vector3.zero, wanderRadius);

        steeringUtils = gameObject.GetComponent <SteeringUtils> ();
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        steeringUtils = gameObject.GetComponent <SteeringUtils> ();
        enemy         = gameObject.GetComponent <Enemy> ();

        player = GameObject.Find("Player").transform;
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     map           = GameObject.Find("Map").GetComponent <TileMap> ().map;
     steeringUtils = GetComponent <SteeringUtils> ();
     followPath    = GetComponent <FollowPath> ();
     rb            = GetComponent <Rigidbody2D> ();
     player        = GameObject.Find("Player").transform;
     laser         = GetComponentInChildren <EnemyLaser> ();
     sr            = GetComponent <SpriteRenderer> ();
 }
コード例 #4
0
    void Start()
    {
        //		DebugDraw debugDraw = gameObject.GetComponent<DebugDraw> ();
        //		debugRing = debugDraw.createRing (Vector3.zero, wanderRadius);

        steeringUtils = gameObject.GetComponent <SteeringUtils> ();

        levelBoundaryMask = (1 << LayerMask.NameToLayer("LevelBoundary"));

        enemy = gameObject.GetComponent <Enemy> ();
    }
コード例 #5
0
ファイル: Mover.cs プロジェクト: frms/game-jams
    // Use this for initialization
    public virtual void Start()
    {
        steeringUtils = GetComponent <SteeringUtils> ();
        followPath    = GetComponent <FollowPath> ();
        rb            = GetComponent <Rigidbody>();

        int[] mapPos = Map.map.worldToMapPoint(transform.position);
        reservePosition(mapPos);

        myDebugCircle = Instantiate(debugCircle, transform.position, Quaternion.identity) as Transform;
    }
コード例 #6
0
    // Use this for initialization
    public override void Start()
    {
        base.Start();

        map = GameObject.Find("TileMap").GetComponent <MapBuilder> ().map;

        steeringUtils = GetComponent <SteeringUtils> ();
        steeringUtils.collAvoidRadius = GetComponent <CircleCollider2D> ().radius;
        followPath = GetComponent <FollowPath> ();
        rb         = GetComponent <Rigidbody2D> ();

        collAvoidSensor = transform.Find("CollAvoidSensor").GetComponent <NearSensor> ();
        atkRange        = transform.Find("AtkRange").GetComponent <NearSensor> ();
    }
コード例 #7
0
    // Use this for initialization
    public virtual void Start()
    {
        steeringUtils = GetComponent<SteeringUtils> ();
        followPath = GetComponent<FollowPath> ();
        rb = GetComponent<Rigidbody>();

        int[] mapPos = Map.map.worldToMapPoint(transform.position);
        reservePosition(mapPos);

        myDebugCircle = Instantiate(debugCircle, transform.position, Quaternion.identity) as Transform;
    }
コード例 #8
0
 // Use this for initialization
 void Start()
 {
     steeringUtils = GetComponent<SteeringUtils> ();
     rb = GetComponent<Rigidbody> ();
 }
コード例 #9
0
 // Use this for initialization
 void Start()
 {
     steeringUtils = GetComponent <SteeringUtils> ();
     rb            = GetComponent <Rigidbody2D> ();
 }